af_resample: check av_opt_set_dict return value
authorVittorio Giovara <vittorio.giovara@gmail.com>
Fri, 17 Oct 2014 09:07:11 +0000 (10:07 +0100)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Mon, 12 Jan 2015 22:59:48 +0000 (23:59 +0100)
CC: libav-stable@libav.org
Bug-Id: CID 1087076

libavfilter/af_resample.c

index a59e6f8..fbe6105 100644 (file)
@@ -136,11 +136,14 @@ static int config_output(AVFilterLink *outlink)
         return AVERROR(ENOMEM);
 
     if (s->options) {
+        int ret;
         AVDictionaryEntry *e = NULL;
         while ((e = av_dict_get(s->options, "", e, AV_DICT_IGNORE_SUFFIX)))
             av_log(ctx, AV_LOG_VERBOSE, "lavr option: %s=%s\n", e->key, e->value);
 
-        av_opt_set_dict(s->avr, &s->options);
+        ret = av_opt_set_dict(s->avr, &s->options);
+        if (ret < 0)
+            return ret;
     }
 
     av_opt_set_int(s->avr,  "in_channel_layout", inlink ->channel_layout, 0);