[FFmpeg-cvslog] af_channelmap: ensure the output channel layout is valid.

Anton Khirnov git at videolan.org
Wed May 1 10:23:36 CEST 2013


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Apr 10 12:40:04 2013 +0200| [8aaab1113c00f2c90f3ce9ebe0c29af19cb155fd] | committer: Anton Khirnov

af_channelmap: ensure the output channel layout is valid.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8aaab1113c00f2c90f3ce9ebe0c29af19cb155fd
---

 libavfilter/af_channelmap.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c
index 2aac538..34d2457 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) {



More information about the ffmpeg-cvslog mailing list