[FFmpeg-cvslog] libmpcodecs/vf_uspp: check avcodec_open() return code

michael git at videolan.org
Sun May 11 02:18:17 CEST 2014


ffmpeg | branch: master | michael <michael at b3059339-0415-0410-9bf9-f77b7e298cf2> | Sat May 10 23:48:24 2014 +0000| [04e140daa21c1e4e7c61009fadd211c19e080863] | committer: Michael Niedermayer

libmpcodecs/vf_uspp: check avcodec_open() return code

Fixes CID1135747

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=04e140daa21c1e4e7c61009fadd211c19e080863
---

 libavfilter/libmpcodecs/vf_uspp.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavfilter/libmpcodecs/vf_uspp.c b/libavfilter/libmpcodecs/vf_uspp.c
index 3923f17..c9d9c1f 100644
--- a/libavfilter/libmpcodecs/vf_uspp.c
+++ b/libavfilter/libmpcodecs/vf_uspp.c
@@ -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);
         }



More information about the ffmpeg-cvslog mailing list