GNOME Bugzilla – Bug 664034
[PATCH] [mpegvideoparse] Proper timestamp generation and codec_data fixes
Last modified: 2012-04-14 19:31:22 UTC
Created attachment 201368 [details] [review] Patch to fix timestamp generation and codec_data Currently mpegvideoparse generates monotonous timestamps for delta frames by adding previous frame duration, that is not correct for B-frames. This breaks mpeg2dec and it also makes difficult to use decoder that doesn't output video frames in presentation order (i.e. Apple decoders). Patch adds proper timestamp generation. Second issue is quantization matrices changing in codec_data. For some reason this causes frame freezes in certain parts of the videos. Patch fixes this by changing codec_data only if there are other changes in sequence header. Also the codec_data should include start-code otherwise gop-split mode doesn't work properly.
Created attachment 201390 [details] [review] Make the parse_process_config code little bit cleaner
Another issue - The parser updates caps in drop mode before it parsed sequence header resulting in caps that are not subset of template caps (because the mpegversion is missing, etc). Patch attached.
Created attachment 201728 [details] [review] No not update caps while dropping frames
See also https://bugzilla.gnome.org/show_bug.cgi?id=664035 and https://bugzilla.gnome.org/show_bug.cgi?id=664037
Created attachment 202261 [details] [review] Patch for GStreamer 0.11 Includes all 3 previous patches
Could you split the first patch into (at least) 2 patches, one for the timestamp generation change and one for the codec_data? Also, is the mutex really necessary? From what I see this is only ever called from the streaming thread.
The mutex is not necessary, I removed it in following patches.
Created attachment 202309 [details] [review] 0.10 - Codec data fixes
Created attachment 202310 [details] [review] 0.10 - Proper timestamp generation
Created attachment 202311 [details] [review] 0.11 - Codec data fixes
Created attachment 202312 [details] [review] 0.11 - Proper timestamp generation
Created attachment 205253 [details] [review] 0.11 Proper timestamp generation + Codec data fixes Updated against latest git
Created attachment 206177 [details] [review] 0.11 Proper timestamp generation + Codec data fixes Updated against latest git. Would be really nice if someone could take a look and tell me if this is a go or not. I can provide sample file that can be used to demonstrate broken timestamps that current parser generates.
This patch doesn't work anymore with latest git. Also https://bugzilla.gnome.org/show_bug.cgi?id=674113