[libav-stable] af_resample: check av_opt_set_dict return value

Vittorio Giovara git at libav.org
Sat Oct 18 17:21:01 CEST 2014


Module: libav
Branch: master
Commit: 0d989dbfc4bc5bc1d563e967449116a7a9865258

Author:    Vittorio Giovara <vittorio.giovara at gmail.com>
Committer: Vittorio Giovara <vittorio.giovara at gmail.com>
Date:      Fri Oct 17 10:07:11 2014 +0100

af_resample: check av_opt_set_dict return value

CC: libav-stable at libav.org
Bug-Id: CID 1087076

---

 libavfilter/af_resample.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavfilter/af_resample.c b/libavfilter/af_resample.c
index a59e6f8..fbe6105 100644
--- a/libavfilter/af_resample.c
+++ b/libavfilter/af_resample.c
@@ -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);



More information about the libav-stable mailing list