codecparsers: mpeg2: don't mess the StartCode only packets
It is completely legal to have packets with zero sizes. Zero-sized packet indicates header with only Start Code. One eg: is user data packet. The patch allows having GstMpegVideoPacket with zero sizes. https://bugzilla.gnome.org/show_bug.cgi?id=796477
This commit is contained in:
parent
3f2314a1a9
commit
700d6782ce
@ -264,7 +264,7 @@ gst_mpeg_video_parse (GstMpegVideoPacket * packet,
|
|||||||
size -= off + 4;
|
size -= off + 4;
|
||||||
off = scan_for_start_codes (&br, 0, size);
|
off = scan_for_start_codes (&br, 0, size);
|
||||||
|
|
||||||
if (off > 0)
|
if (off >= 0)
|
||||||
packet->size = off;
|
packet->size = off;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user