[FFmpeg-devel] [PATCH] mkv MatroskaBlock.duration not initialized for SimpleBlock
aurel at gnuage.org
Fri Mar 18 11:29:14 CET 2011
On Thu, Mar 17, 2011 at 08:14:35PM -0700, John Stebbins wrote:
> On 03/16/2011 03:54 PM, Aurelien Jacobs wrote:
> >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 ?
> I should have time to test the latest code tomorrow. Did your patch
> make it to a mailing list somewhere? I can't find it in all the
> confusion with the splits and all. I would like to look it over to
> see how you solved the problem.
Have a look here:
More information about the ffmpeg-devel