aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-12-31 15:20:25 +0100
committerNicolas George <nicolas.george@normalesup.org>2013-01-26 11:15:38 +0100
commitfccd8c21c40cf004cacaa6b4bf12695ecb014c1b (patch)
tree0a8fedb1410ae00d037df4eb3ab619eadb181c78 /ffmpeg.c
parent9648e1495bf6074da6c8f867974ede09f83f73ed (diff)
downloadffmpeg-fccd8c21c40cf004cacaa6b4bf12695ecb014c1b.tar.gz
ffmpeg: add -guess_layout_max option.
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 6d53edfa64..329b7e420f 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1443,6 +1443,8 @@ int guess_input_channel_layout(InputStream *ist)
if (!dec->channel_layout) {
char layout_name[256];
+ if (dec->channels > ist->guess_layout_max)
+ return 0;
dec->channel_layout = av_get_default_channel_layout(dec->channels);
if (!dec->channel_layout)
return 0;