set pix_fmt properly depending on version
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 13 Aug 2007 00:56:26 +0000 (00:56 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 13 Aug 2007 00:56:26 +0000 (00:56 +0000)
Originally committed as revision 10095 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/4xm.c

index aca8618..b82797d 100644 (file)
@@ -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;
 }