commit | 4d297e70503ac25f5886bd978681e3d47df045aa | [log] [tgz] |
---|---|---|
author | Sreerenj Balachandran <sreerenj.balachandran@intel.com> | Thu May 31 18:21:58 2018 -0800 |
committer | Sreerenj Balachandran <sreerenj.balachandran@intel.com> | Fri Jun 01 14:06:35 2018 -0800 |
tree | 5126d4f3cb90a3c7e134562b959fce8b48f33497 | |
parent | 839cc392686c2d5657d5a0b16661ad53ce0e76b3 [diff] |
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
diff --git a/gst-libs/gst/codecparsers/gstmpegvideoparser.c b/gst-libs/gst/codecparsers/gstmpegvideoparser.c index 5d0e6a7..408ae03 100644 --- a/gst-libs/gst/codecparsers/gstmpegvideoparser.c +++ b/gst-libs/gst/codecparsers/gstmpegvideoparser.c
@@ -264,7 +264,7 @@ size -= off + 4; off = scan_for_start_codes (&br, 0, size); - if (off > 0) + if (off >= 0) packet->size = off; return TRUE;