summaryrefslogtreecommitdiff
path: root/ffmpeg_opt.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_opt.c
parent9648e1495bf6074da6c8f867974ede09f83f73ed (diff)
downloadffmpeg-fccd8c21c40cf004cacaa6b4bf12695ecb014c1b.tar.gz
ffmpeg: add -guess_layout_max option.
Diffstat (limited to 'ffmpeg_opt.c')
-rw-r--r--ffmpeg_opt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 9a53bd68fd..09bbc9cf27 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -616,6 +616,8 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
break;
case AVMEDIA_TYPE_AUDIO:
+ ist->guess_layout_max = INT_MAX;
+ MATCH_PER_STREAM_OPT(guess_layout_max, i, ist->guess_layout_max, ic, st);
guess_input_channel_layout(ist);
ist->resample_sample_fmt = dec->sample_fmt;
@@ -2581,6 +2583,8 @@ const OptionDef options[] = {
"set channel layout", "layout" },
{ "af", OPT_AUDIO | HAS_ARG | OPT_PERFILE, { .func_arg = opt_audio_filters },
"set audio filters", "filter_graph" },
+ { "guess_layout_max", OPT_AUDIO | HAS_ARG | OPT_INT | OPT_SPEC | OPT_EXPERT, { .off = OFFSET(guess_layout_max) },
+ "set the maximum number of channels to try to guess the channel layout" },
/* subtitle options */
{ "sn", OPT_SUBTITLE | OPT_BOOL | OPT_OFFSET, { .off = OFFSET(subtitle_disable) },