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

Stefano Sabatini stefano.sabatini-lala at poste.it
Mon May 2 10:57:21 CEST 2011


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.
-- 
FFmpeg = Furious and Fascinating Meaningful Pacific Evanescent Gospel


More information about the ffmpeg-devel mailing list