changeset 7932:7729da3e4866 libavcodec

Replace apparently always true condition by assert().
author michael
date Sat, 27 Sep 2008 02:39:24 +0000
parents fd6c05a225aa
children 6375f3f92e74
files mjpegdec.c
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mjpegdec.c	Sat Sep 27 01:59:50 2008 +0000
+++ b/mjpegdec.c	Sat Sep 27 02:39:24 2008 +0000
@@ -298,10 +298,9 @@
     case 0x11111100:
         if(s->rgb){
             s->avctx->pix_fmt = PIX_FMT_RGB32;
-        }else if(s->nb_components==3)
+        }else
             s->avctx->pix_fmt = s->cs_itu601 ? PIX_FMT_YUV444P : PIX_FMT_YUVJ444P;
-        else
-            s->avctx->pix_fmt = PIX_FMT_GRAY8;
+        assert(s->nb_components==3);
         break;
     case 0x11000000:
         s->avctx->pix_fmt = PIX_FMT_GRAY8;