[FFmpeg-devel] [RFC] Add duration info to AVFrame

Stefano Sabatini stefasab at gmail.com
Thu Mar 8 15:50:21 CET 2012


Hi,

the feature would be useful for different purposes, especially for
normalization/correction timestamp filters (e.g. setpts).

Different approaches:

1. I could export pkt_duration in AVFrame, like it is done with
   pkt_pts, duration is expressed in stream time_base units.

   This alone is not sufficient, because to decode pkt* things we need
   to reference the AVStream, which is not always available.

2. I create a duration field in AVFrame, with no specified timebase,
   which is done for passing the duration information between
   different layers (e.g. lavc -> lavfi -> lavc), similar to what we
   did for pts.
   Then I could add a time_base unit in AVFrame, which is used for
   specifying the PTS and duration timebase.

3. a combination of 1/2

Comments are welcome.
-- 
FFmpeg = Funny & Fanciful Majestic Practical Extravagant Gorilla


More information about the ffmpeg-devel mailing list