mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
j2kpay: handle EOC correctly
Don't include the next 2 bytes when we are at the end of the data and there are no more bytes left.
This commit is contained in:
parent
53b9f87436
commit
b87ec0262b
1 changed files with 2 additions and 2 deletions
|
@ -241,8 +241,8 @@ find_pu_end (GstRtpJ2KPay * pay, const guint8 * data, guint size,
|
|||
GST_LOG_OBJECT (pay, "reached next SOT at %u", offset);
|
||||
state->bitstream = FALSE;
|
||||
state->force_packet = TRUE;
|
||||
if (marker == J2K_MARKER_EOC)
|
||||
/* include EOC */
|
||||
if (marker == J2K_MARKER_EOC && state->next_sot + 2 <= size)
|
||||
/* include EOC but never go past the max size */
|
||||
return state->next_sot + 2;
|
||||
else
|
||||
return state->next_sot;
|
||||
|
|
Loading…
Reference in a new issue