[FFmpeg-devel] [PATCH] lavfi: add duration field to AVFilterBufferRef

Stefano Sabatini stefasab at gmail.com
Fri Sep 14 10:39:50 CEST 2012


On date Friday 2012-09-14 02:33:02 +0200, Clément Bœsch encoded:
> On Thu, Sep 13, 2012 at 11:37:14AM +0200, Stefano Sabatini wrote:
> > ---
> >  libavfilter/af_ashowinfo.c |    3 ++-
> >  libavfilter/audio.c        |    2 ++
> >  libavfilter/avcodec.c      |    2 ++
> >  libavfilter/avfilter.h     |    8 ++++++++
> >  libavfilter/buffer.c       |    1 +
> >  libavfilter/f_settb.c      |   10 ++++++----
> >  libavfilter/vf_showinfo.c  |    6 ++++--
> >  libavfilter/video.c        |    1 +
> >  8 files changed, 26 insertions(+), 7 deletions(-)
> > 
> [...]
> > diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
> > index 7cc6125..76454a6 100644
> > --- a/libavfilter/avfilter.h
> > +++ b/libavfilter/avfilter.h
> > @@ -181,6 +181,14 @@ typedef struct AVFilterBufferRef {
> >      int perms;                  ///< permissions, see the AV_PERM_* flags
> >  
> >      enum AVMediaType type;      ///< media type of buffer data
> > +
> > +    /**
> > +     * duration timestamp, expressed in link time base units. The time
> > +     * unit may change during filtering, as it is specified in the
> > +     * link and the filter code may need to rescale the duration
> > +     * accordingly. An undefined value must be set to AV_NOPTS_VALUE.
> > +     */
> > +    int64_t duration;
> 
> Don't you need to make accessors for this?

You are confusing AVFilterBufferRef with AVFrame (we have no accessors
for the former).
-- 
FFmpeg = Fiendish Free Mastodontic Puristic Exciting God


More information about the ffmpeg-devel mailing list