This validates the requirements that
* abs_start_samplenum continues where the previous decode ended
* abs_end_samplenum is not lower than abs_start_samplenum
Failure to meet these requirements will make v3 decoders crash.
return SRD_ERR_ARG;
}
+ if (abs_start_samplenum != di->abs_cur_samplenum ||
+ abs_end_samplenum < abs_start_samplenum) {
+ srd_dbg("incorrect sample numbers");
+ return SRD_ERR_ARG;
+ }
+
di->data_unitsize = unitsize;
srd_dbg("Decoding: abs start sample %" PRIu64 ", abs end sample %"
di->inst_id);
return SRD_ERR_PYTHON;
}
+ di->abs_cur_samplenum = abs_end_samplenum;
Py_DecRef(py_res);
} else {
/* If this is the first call, start the worker thread. */