[FFmpeg-devel] [PATCH] mkv MatroskaBlock.duration not initialized for SimpleBlock

John Stebbins stebbins
Thu Mar 10 03:52:26 CET 2011

When a normal Block is parsed, duration is initialized to AV_NOPTS_VALUE.  If it is not changed, then the track's 
default duration is used.  But for SimpleBlock, duration is initialized to 0 instead of AV_NOPTS_VALUE.  This is due to 
the difference in how EBML_NEST vs EBML_PASS are processed.  Setting duration to 0 leads eventually to estimating the 
frame duration in util.c.  For the sample I am testing (DTS-HD MA track in mkv generated by MakeMKV), this estimate is 
based on frame size and bitrate which is wildly inaccurate. End result is pts values that jump all over the place and 
sometimes go backwards.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ff.mkv_simpleblock.diff
Type: text/x-patch
Size: 731 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110309/474d9ace/attachment.bin>

More information about the ffmpeg-devel mailing list