basetsmuxjpeg2000: first demuxed frame's j2k buffer size is always 8 bytes shorter than specified size in elementary stream header
Test pipeline:
videotestsrc pattern=ball ! openjpegenc ! jpeg2000parse ! mpegtsmux ! rtpmp2tpay ! rtpmp2tdepay ! tsdemux ! jpeg2000parse ! openjpegdec ! videoconvert ! ximagesink
This pipeline fails with error:
Required size (2375) greater than remaining size in buffer (2367)
This only happens for the very first frame that is demuxed. For all others, required size (as specified in elementary stream header) matches actual size.
Error comes from this code block:
/* Check if we have enough data to create a valid buffer */
if ((stream->current_size - data_location) < (AUF[0] + AUF[1])) {
GST_ERROR ("Required size (%d) greater than remaining size in buffer (%d)",
AUF[0] + AUF[1], (stream->current_size - data_location));
goto error;
}
cc @bilboed
Edited by Aaron Boxer