mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
mpeg4parser: prevent assertion when scanning for sync code
Only search if there is indeed enough data to be searched otherwise an assertion is raised
This commit is contained in:
parent
ab31900b64
commit
115945b663
1 changed files with 5 additions and 2 deletions
|
@ -481,8 +481,11 @@ gst_mpeg4_parse (GstMpeg4Packet * packet, gboolean skip_user_data,
|
|||
packet->type = (GstMpeg4StartCode) (data[off1 + 3]);
|
||||
|
||||
find_end:
|
||||
if (off1 < size - 4)
|
||||
off2 = gst_byte_reader_masked_scan_uint32 (&br, 0xffffff00, 0x00000100,
|
||||
off1 + 4, size - off1 - 4);
|
||||
else
|
||||
off2 = -1;
|
||||
|
||||
if (off2 == -1) {
|
||||
GST_DEBUG ("Packet start %d, No end found", off1 + 4);
|
||||
|
|
Loading…
Reference in a new issue