[FFmpeg-devel] [PATCH] lavc: set frame defaults in internals codec frames

Michael Niedermayer michaelni at gmx.at
Mon May 2 12:29:58 CEST 2011


On Mon, May 02, 2011 at 10:57:21AM +0200, Stefano Sabatini wrote:
> On date Monday 2011-05-02 02:18:11 +0200, Stefano Sabatini encoded:
> > This is required, specifically for setting frame->format to -1,
> > otherwise it will be set to 0 = PIX_FMT_YUV420P and code reading
> > format from the output decoded frame will get misled.
> > 
> > In particular fix regressions occurring with the pending vsrc_buffer
> > patch.
> > ---
> >  libavcodec/dnxhddec.c    |    1 +
> >  libavcodec/dv.c          |    1 +
> >  libavcodec/flashsv.c     |    1 +
> >  libavcodec/huffyuv.c     |    1 +
> >  libavcodec/mjpegdec.c    |    1 +
> >  libavcodec/qtrle.c       |    2 ++
> >  libavcodec/roqvideodec.c |    2 ++
> >  7 files changed, 9 insertions(+), 0 deletions(-)
> 
> I'm working through the complete fate suite and there a lot more than
> these. So my question is, is acceptable to require to use
> avcodec_get_frame_defaults() in all codecs?
> 
> Alternatively we may just set frame.format = -1, but using
> avcodec_get_frame_defaults() should be more future-proof.

i agree, its probably a good idea to use avcodec_get_frame_defaults()
the patch also LGTM if it works

also note we might need special freeing code if frames ever use
string type

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Avoid a single point of failure, be that a person or equipment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110502/bfe1ec61/attachment.asc>


More information about the ffmpeg-devel mailing list