[FFmpeg-cvslog] prores: do not set pixel format on codec init

Mans Rullgard git at videolan.org
Sun Oct 16 04:20:38 CEST 2011


ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Sat Oct 15 14:35:10 2011 +0100| [cd14e297e63c89dfe44ebfe4e6a82b617352a081] | committer: Mans Rullgard

prores: do not set pixel format on codec init

The pixel format is not known until the frame header is parsed.
Guessing it here only causes trouble for the caller if the guess
turns out to be wrong (and actually causes very wrong output by
avconv/avplay).

Signed-off-by: Mans Rullgard <mans at mansr.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cd14e297e63c89dfe44ebfe4e6a82b617352a081
---

 libavcodec/proresdec.c      |    2 --
 tests/ref/fate/prores-alpha |    2 +-
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/libavcodec/proresdec.c b/libavcodec/proresdec.c
index 2e0cbf1..ca465f4 100644
--- a/libavcodec/proresdec.c
+++ b/libavcodec/proresdec.c
@@ -105,8 +105,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
     ctx->total_slices     = 0;
     ctx->slice_data       = NULL;
 
-    avctx->pix_fmt = PIX_FMT_YUV422P10; // set default pixel format
-
     avctx->bits_per_raw_sample = PRORES_BITS_PER_SAMPLE;
     ff_proresdsp_init(&ctx->dsp);
 
diff --git a/tests/ref/fate/prores-alpha b/tests/ref/fate/prores-alpha
index f8df87d..8ad611d 100644
--- a/tests/ref/fate/prores-alpha
+++ b/tests/ref/fate/prores-alpha
@@ -1,2 +1,2 @@
-0, 0, 12441600, 0x5188265d
+0, 0, 12441600, 0x79c18863
 0, 3003, 12441600, 0x79c18863



More information about the ffmpeg-cvslog mailing list