libmpcodecs/vf_uspp: check avcodec_open() return code
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sat, 10 May 2014 23:48:24 +0000 (23:48 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 11 May 2014 00:13:28 +0000 (02:13 +0200)
Fixes CID1135747

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/libmpcodecs/vf_uspp.c

index 3923f17..c9d9c1f 100644 (file)
@@ -241,7 +241,8 @@ static int config(struct vf_instance *vf,
             avctx_enc->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;
             avctx_enc->global_quality= 123;
             av_dict_set(&opts, "no_bitstream", "1", 0);
-            avcodec_open2(avctx_enc, enc, &opts);
+            if (avcodec_open2(avctx_enc, enc, &opts) < 0)
+                return 0;
             av_dict_free(&opts);
             assert(avctx_enc->codec);
         }