Commit e41d3aba authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'c22263d3'

* commit 'c22263d3':
  graphparser: only print filter arguments if they are non-NULL
  af_channelmap: ensure the output channel layout is valid.
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents a1b88797 c22263d3
...@@ -271,6 +271,12 @@ static av_cold int channelmap_init(AVFilterContext *ctx) ...@@ -271,6 +271,12 @@ static av_cold int channelmap_init(AVFilterContext *ctx)
} }
s->output_layout = fmt; s->output_layout = fmt;
} }
if (!s->output_layout) {
av_log(ctx, AV_LOG_ERROR, "Output channel layout is not set and "
"cannot be guessed from the maps.\n");
return AVERROR(EINVAL);
}
ff_add_channel_layout(&s->channel_layouts, s->output_layout); ff_add_channel_layout(&s->channel_layouts, s->output_layout);
if (mode == MAP_PAIR_INT_STR || mode == MAP_PAIR_STR_STR) { if (mode == MAP_PAIR_INT_STR || mode == MAP_PAIR_STR_STR) {
......
...@@ -126,7 +126,10 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind ...@@ -126,7 +126,10 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind
ret = avfilter_init_str(*filt_ctx, args); ret = avfilter_init_str(*filt_ctx, args);
if (ret < 0) { if (ret < 0) {
av_log(log_ctx, AV_LOG_ERROR, av_log(log_ctx, AV_LOG_ERROR,
"Error initializing filter '%s' with args '%s'\n", filt_name, args); "Error initializing filter '%s'", filt_name);
if (args)
av_log(log_ctx, AV_LOG_ERROR, " with args '%s'", args);
av_log(log_ctx, AV_LOG_ERROR, "\n");
return ret; return ret;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment