avcodec/mjpegdec: make "unknown colorspace" error more informative
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 4 Sep 2013 22:39:04 +0000 (00:39 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 4 Sep 2013 23:39:20 +0000 (01:39 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mjpegdec.c

index 2d609c4..8b48ea2 100644 (file)
@@ -1473,7 +1473,7 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
         skip_bits(&s->gb, 16); /* unknown always 0? */
         skip_bits(&s->gb, 16); /* unknown always 0? */
         skip_bits(&s->gb, 16); /* unknown always 0? */
-        switch (get_bits(&s->gb, 8)) {
+        switch (i=get_bits(&s->gb, 8)) {
         case 1:
             s->rgb         = 1;
             s->pegasus_rct = 0;
@@ -1483,7 +1483,7 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
             s->pegasus_rct = 1;
             break;
         default:
-            av_log(s->avctx, AV_LOG_ERROR, "unknown colorspace\n");
+            av_log(s->avctx, AV_LOG_ERROR, "unknown colorspace %d\n", i);
         }
         len -= 9;
         goto out;