[FFmpeg-devel] [PATCH] lavc: add pkt_size field to AVFrame

Stefano Sabatini stefasab at gmail.com
Sat Dec 15 12:00:29 CET 2012


On date Saturday 2012-12-15 01:27:27 +0100, Michael Niedermayer encoded:
> On Fri, Dec 14, 2012 at 05:52:16PM +0100, Stefano Sabatini wrote:
> > TODO: add APIchanges entry, bump minor
> > ---
> >  libavcodec/avcodec.h |   12 ++++++++++++
> >  libavcodec/utils.c   |    4 ++++
> >  2 files changed, 16 insertions(+)
> > 
> > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> > index e432040..2c8288b 100644
> > --- a/libavcodec/avcodec.h
> > +++ b/libavcodec/avcodec.h
> > @@ -1467,6 +1467,16 @@ typedef struct AVFrame {
> >       * - decoding: Read by user.
> >       */
> >      int64_t channels;
> > +
> > +    /**
> > +     * size of the corresponding packet, containing the compressed
> > +     * size of the frame, only relevant for video. It must be accessed
> > +     * using av_frame_get_pkt_size() and av_frame_set_pkt_size().
> 
> > +     * It is set to -1 if unknown.
> 

> i suggest negative here (under the principle of leaving the API
> maximally flexible for future extension)

Good remark.

> 
> and a entry should be added to frame_options
> 
> otherwise this should be ok

Changed and applied, thanks.
-- 
FFmpeg = Fabulous Formidable Majestic Philosofic ExchanGer


More information about the ffmpeg-devel mailing list