GNOME Bugzilla – Bug 796477
codecparsers: mpeg2: Allow parsing start code only packets
Last modified: 2018-06-01 19:40:56 UTC
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.
Created attachment 372498 [details] [review] codecparsers: mpeg2: don't mess the StartCode only packets
Thanks ! Attachment 372498 [details] pushed as 700d678 - codecparsers: mpeg2: don't mess the StartCode only packets
Review of attachment 372498 [details] [review]: What the usage, and how does not dropping this helps ?
Without this, the parsed MpegVideoPacket will have a size -1 which indicate that the incoming buffer doesn't have enough bytes to read. Which is actually not true. And this will mess up the code in gst/videoparsers/gstmpegvideoparse.c gst_mpegv_parse_handle_frame(). You can check with the video sample attached in: https://bugzilla.gnome.org/show_bug.cgi?id=793867
Uh, thanks for clarifying and fixing.