diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-04-10 12:40:04 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-04-30 11:16:37 +0200 |
commit | 8aaab1113c00f2c90f3ce9ebe0c29af19cb155fd (patch) | |
tree | 074c991aa377793562e34708fba74ed6c45e3463 /libavfilter/af_channelmap.c | |
parent | 949c603ed9210df0e1b8e1aa82c71b93543d8071 (diff) | |
download | ffmpeg-8aaab1113c00f2c90f3ce9ebe0c29af19cb155fd.tar.gz |
af_channelmap: ensure the output channel layout is valid.
Diffstat (limited to 'libavfilter/af_channelmap.c')
-rw-r--r-- | libavfilter/af_channelmap.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c index 2aac5381a6..34d2457efd 100644 --- a/libavfilter/af_channelmap.c +++ b/libavfilter/af_channelmap.c @@ -270,6 +270,12 @@ static av_cold int channelmap_init(AVFilterContext *ctx) } 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); if (mode == MAP_PAIR_INT_STR || mode == MAP_PAIR_STR_STR) { |