[FFmpeg-devel] [PATCH] mkv MatroskaBlock.duration not initialized for SimpleBlock
Wed Mar 16 23:54:34 CET 2011
On Wed, Mar 09, 2011 at 06:52:26PM -0800, John Stebbins wrote:
> 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.
Indeed. Thanks for the good analysis.
I've just fixed it in a slightly nicer way.
> 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.
Could you please check if my fix works fine for your sample ?
More information about the ffmpeg-devel