[FFmpeg-devel] [RFC] Add duration info to AVFrame
michaelni at gmx.at
Fri Jun 1 14:10:35 CEST 2012
On Fri, Jun 01, 2012 at 11:14:04AM +0200, Stefano Sabatini wrote:
> On date Thursday 2012-03-08 15:50:21 +0100, Stefano Sabatini encoded:
> > 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.
> Done like 1.
> * as mentioned, pkt_pts alone can't be interpreted if there is no
> reference to the stream timebase.
> * it is not possible to distinguish between duration=0 and
> duration=unknown, because 0 == unknown, which depends on how
> duration is defined in AVPacket.
> Otherwise: would it make sense to change the semantics in AVPacket
when/where does something have a duration of 0 ?
the patch LGTM
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
What does censorship reveal? It reveals fear. -- Julian Assange
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel