af_resample: check av_opt_set_dict return value

CC: libav-stable@libav.org
Bug-Id: CID 1087076
pull/89/head
Vittorio Giovara 10 years ago
parent 6d96c7ea89
commit 0d989dbfc4
  1. 5
      libavfilter/af_resample.c

@ -136,11 +136,14 @@ static int config_output(AVFilterLink *outlink)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
if (s->options) { if (s->options) {
int ret;
AVDictionaryEntry *e = NULL; AVDictionaryEntry *e = NULL;
while ((e = av_dict_get(s->options, "", e, AV_DICT_IGNORE_SUFFIX))) 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_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); av_opt_set_int(s->avr, "in_channel_layout", inlink ->channel_layout, 0);

Loading…
Cancel
Save