GNOME Bugzilla – Bug 533559
mpeg4videoparse should skip garbage
Last modified: 2008-05-22 14:03:31 UTC
Hi, My last patch for mpeg4videoparse contained a workaround for some i've got. Namely if a VOP is followed by a userdata block combine both in one frame, even though the mpeg4 bitstream spec doesn't allow userdata after a VOP. Some more testing revealed that the cameras mpeg4 stream is even more buggy then that. Not only is the userdata blob the data in it can contain things that look like start codes :( The nicest solution for this is to discard all data between the end of a VOP and the start of either a VOS, GOP or VOP. Will attach a patch in a bit
Created attachment 111044 [details] [review] Get rid of invalid data
Patch by: Sjoerd Simons <sjoerd at luon dot net> * gst/mpeg4videoparse/mpeg4videoparse.c: (gst_mpeg4vparse_push), (gst_mpeg4vparse_drain), (gst_mpeg4vparse_chain), (gst_mpeg4vparse_change_state): Move some code around to integrate the startcode searching with the other bits of parsing, avoid a whole bunch of peeks. Get rid of invalid data that should not happen according to the specs. Fixes #533559.