[FFmpeg-cvslog] avcodec/huffyuvdec: use RGB0 for 24bit rgb output instead of BGRA

Michael Niedermayer git at videolan.org
Tue Feb 18 17:01:22 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Feb 18 16:07:54 2014 +0100| [9bb1af8f36ec666280d5cd3a2d2261abe4187940] | committer: Michael Niedermayer

avcodec/huffyuvdec: use RGB0 for 24bit rgb output instead of BGRA

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

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

 libavcodec/huffyuvdec.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c
index 0f6f223..811347a 100644
--- a/libavcodec/huffyuvdec.c
+++ b/libavcodec/huffyuvdec.c
@@ -361,14 +361,17 @@ static av_cold int decode_init(AVCodecContext *avctx)
             s->yuv = 1;
             break;
         case 24:
-        case 32:
             if (s->bgr32) {
-                avctx->pix_fmt = AV_PIX_FMT_RGB32;
-                s->alpha = 1;
+                avctx->pix_fmt = AV_PIX_FMT_0RGB32;
             } else {
                 avctx->pix_fmt = AV_PIX_FMT_BGR24;
             }
             break;
+        case 32:
+            av_assert0(s->bgr32);
+            avctx->pix_fmt = AV_PIX_FMT_RGB32;
+            s->alpha = 1;
+            break;
         default:
             return AVERROR_INVALIDDATA;
         }



More information about the ffmpeg-cvslog mailing list