[FFmpeg-devel] [PATCH] lavf: Add flags for how duration is estimated

Michael Bradshaw mbradshaw at sorensonmedia.com
Fri Jun 15 18:01:39 CEST 2012


On Fri, Jun 15, 2012 at 7:57 AM, Nicolas George
<nicolas.george at normalesup.org> wrote:
> Le septidi 27 prairial, an CCXX, Michael Bradshaw a écrit :
>> Attached patch adds 3 flags for AVFormatContext.flags so users can
>> know how the duration is retrieved and how accurate it is. I have a
>> use-case where I need to know if it's estimated from the bitrate.
>>
>> Please review. If someone has a better idea of how this can be
>> implemented, I welcome their input.
>
> If I understand your code correctly, any file will always have exactly one
> of these flags set. This is not really what a flag is. IMHO, adding a
> dedicated field would be better.

Those were my initial thoughts, too. I did it like this to apply
minimal changes, though.

> Since the field would not be shared with libav, it should go in the private
> zone of the structure and be accessed either through the AVOption system or
> a dedicated accessor.

That sounds like a better idea. I'll send a revised patch today.

> The base idea is good, though, thanks.

And thank you.

--Michael


More information about the ffmpeg-devel mailing list