summaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
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 6d53edf..329b7e4 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;
OpenPOWER on IntegriCloud