After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 796477 - codecparsers: mpeg2: Allow parsing start code only packets
codecparsers: mpeg2: Allow parsing start code only packets
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.15.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 793867
 
 
Reported: 2018-06-01 01:30 UTC by sreerenj
Modified: 2018-06-01 19:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
codecparsers: mpeg2: don't mess the StartCode only packets (1.01 KB, patch)
2018-06-01 01:31 UTC, sreerenj
committed Details | Review

Description sreerenj 2018-06-01 01:30:21 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.
Comment 1 sreerenj 2018-06-01 01:31:04 UTC
Created attachment 372498 [details] [review]
codecparsers: mpeg2: don't mess the StartCode only packets
Comment 2 Edward Hervey 2018-06-01 06:20:02 UTC
Thanks !

Attachment 372498 [details] pushed as 700d678 - codecparsers: mpeg2: don't mess the StartCode only packets
Comment 3 Nicolas Dufresne (ndufresne) 2018-06-01 11:05:42 UTC
Review of attachment 372498 [details] [review]:

What the usage, and how does not dropping this helps ?
Comment 4 sreerenj 2018-06-01 18:24:43 UTC
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
Comment 5 Nicolas Dufresne (ndufresne) 2018-06-01 19:40:56 UTC
Uh, thanks for clarifying and fixing.