[FFmpeg-devel] [PATCH] mkv MatroskaBlock.duration not initialized for SimpleBlock
John Stebbins
stebbins at jetheaddev.com
Fri Mar 18 04:14:35 CET 2011
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 ?
>
> Aurel
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.
Thanks
More information about the ffmpeg-devel
mailing list