[FFmpeg-devel] [PATCH] lavf: Add flags for how duration is estimated
nicolas.george at normalesup.org
Fri Jun 15 15:57:58 CEST 2012
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.
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.
The base idea is good, though, thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel