From cf786021a6c76a10f6e3453e01ac43c2fad28ac4 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Mon, 13 Aug 2007 00:56:26 +0000
Subject: [PATCH] set pix_fmt properly depending on version

Originally committed as revision 10095 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavcodec/4xm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index aca86181ba8..b82797d4930 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -787,7 +787,8 @@ static int decode_init(AVCodecContext *avctx){
     common_init(avctx);
     init_vlcs(f);
 
-    avctx->pix_fmt= PIX_FMT_RGB565;
+    if(f->version) avctx->pix_fmt= PIX_FMT_RGB565;
+    else           avctx->pix_fmt= PIX_FMT_RGB555;
 
     return 0;
 }
-- 
GitLab