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

Nicolas George 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.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120615/64d0958f/attachment.asc>

More information about the ffmpeg-devel mailing list