[FFmpeg-devel] [PATCH] AVFrame width/height are now useless except for internal purposes.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun May 5 14:00:36 CEST 2013


On Sun, May 05, 2013 at 01:50:26PM +0200, Michael Niedermayer wrote:
> On Sun, May 05, 2013 at 09:36:54AM +0200, Reimar Döffinger wrote:
> > At least document this change, which for VP6 with cropping triggered
> > a few sanity checks in MPlayer.
> > ---
> >  doc/APIchanges    |    5 +++++
> >  libavutil/frame.h |    4 +++-
> >  2 files changed, 8 insertions(+), 1 deletion(-)
> > 
> > diff --git a/doc/APIchanges b/doc/APIchanges
> > index 763ccf0..a6d3b72 100644
> > --- a/doc/APIchanges
> > +++ b/doc/APIchanges
> > @@ -15,6 +15,11 @@ libavutil:     2012-10-22
> >  
> >  API changes, most recent first:
> >  
> > +2013-??-?? - xxxxxxx - lavu ??.?.???
> > +  AVFrame width and height no longer match AVCodecContext width and height.
> > +  They contain now purely internal values that have no relevance to users,
> > +  you should not use them for any purpose.
> > +
> >  2013-04-19 - xxxxxxx - lavc 55.4.100
> >    Add AV_CODEC_PROP_TEXT_SUB property for text based subtitles codec.
> >  
> > diff --git a/libavutil/frame.h b/libavutil/frame.h
> > index 39a664f..8b1112c 100644
> > --- a/libavutil/frame.h
> > +++ b/libavutil/frame.h
> > @@ -117,7 +117,9 @@ typedef struct AVFrame {
> >      uint8_t **extended_data;
> >  
> >      /**
> > -     * width and height of the video frame
> > +     * allocated width and height of the video frame
> > +     * these have nothing to do with the actual visible size of the
> > +     * frame data, that information is not available
> >       */
> >      int width, height;
> 
> w/h should get corrected after allocating the buffer.

Ok, I must have missed that piece of code.
Either way it definitely does not work for VP6, sample:
http://www1.mplayerhq.hu/~reimar/testfile.flv


More information about the ffmpeg-devel mailing list