[FFmpeg-cvslog] ffv1dec: use PIX_FMT_0RGB32 when there is no transparency plane

Michael Niedermayer git at videolan.org
Mon Nov 28 18:10:53 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Nov 28 17:41:27 2011 +0100| [4b03d960220d15cb915c2c8f15970d2f36f25cd9] | committer: Michael Niedermayer

ffv1dec: use PIX_FMT_0RGB32 when there is no transparency plane

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/ffv1.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index ab544d5..c3034d3 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -1609,7 +1609,8 @@ static int read_header(FFV1Context *f){
             av_log(f->avctx, AV_LOG_ERROR, "chroma subsampling not supported in this colorspace\n");
             return -1;
         }
-        f->avctx->pix_fmt= PIX_FMT_RGB32;
+        if(f->transparency) f->avctx->pix_fmt= PIX_FMT_RGB32;
+        else                f->avctx->pix_fmt= PIX_FMT_0RGB32;
     }else{
         av_log(f->avctx, AV_LOG_ERROR, "colorspace not supported\n");
         return -1;



More information about the ffmpeg-cvslog mailing list