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:
Sreerenj Balachandran 2018-05-31 18:21:58 -08:00 committed by Edward Hervey
parent 3f2314a1a9
commit 700d6782ce

View file

@ -264,7 +264,7 @@ gst_mpeg_video_parse (GstMpegVideoPacket * packet,
size -= off + 4;
off = scan_for_start_codes (&br, 0, size);
if (off > 0)
if (off >= 0)
packet->size = off;
return TRUE;