qtrle: return error on decode_init() failure.
authorRonald S. Bultje <rsbultje@gmail.com>
Wed, 29 Feb 2012 03:00:39 +0000 (19:00 -0800)
committerRonald S. Bultje <rsbultje@gmail.com>
Wed, 29 Feb 2012 19:20:29 +0000 (11:20 -0800)
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
libavcodec/qtrle.c

index e96e278..613dcae 100644 (file)
@@ -407,7 +407,7 @@ static av_cold int qtrle_decode_init(AVCodecContext *avctx)
     default:
         av_log (avctx, AV_LOG_ERROR, "Unsupported colorspace: %d bits/sample?\n",
             avctx->bits_per_coded_sample);
-        break;
+        return AVERROR_INVALIDDATA;
     }
 
     s->frame.data[0] = NULL;