summaryrefslogtreecommitdiff
path: root/avconv_opt.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-08-19 09:15:48 +0200
committerAnton Khirnov <anton@khirnov.net>2012-08-30 13:56:25 +0200
commitbbcedade008b5471c71122944cf4dee1951138ec (patch)
tree96f36fc9549f7d6508e66afccc935c4e9036879d /avconv_opt.c
parent038c0b1e06cadffdd6ac50f058dcc6bc075b9019 (diff)
avconv: make the -passlogfile option per-stream.
Diffstat (limited to 'avconv_opt.c')
-rw-r--r--avconv_opt.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/avconv_opt.c b/avconv_opt.c
index 28bd926c2f..1859af8cf0 100644
--- a/avconv_opt.c
+++ b/avconv_opt.c
@@ -54,7 +54,6 @@
}\
}
-char *pass_logfilename_prefix = NULL;
char *vstats_filename;
float audio_drift_threshold = 0.1;
@@ -967,6 +966,11 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc)
}
}
+ MATCH_PER_STREAM_OPT(passlogfiles, str, ost->logfile_prefix, oc, st);
+ if (ost->logfile_prefix &&
+ !(ost->logfile_prefix = av_strdup(ost->logfile_prefix)))
+ exit_program(1);
+
MATCH_PER_STREAM_OPT(forced_key_frames, str, ost->forced_keyframes, oc, st);
if (ost->forced_keyframes)
ost->forced_keyframes = av_strdup(ost->forced_keyframes);
@@ -1967,7 +1971,7 @@ const OptionDef options[] = {
"use same quantizer as source (implies VBR)" },
{ "pass", OPT_VIDEO | HAS_ARG | OPT_SPEC | OPT_INT, { .off = OFFSET(pass) },
"select the pass number (1 or 2)", "n" },
- { "passlogfile", OPT_VIDEO | HAS_ARG | OPT_STRING | OPT_EXPERT, { &pass_logfilename_prefix },
+ { "passlogfile", OPT_VIDEO | HAS_ARG | OPT_STRING | OPT_EXPERT | OPT_SPEC, { .off = OFFSET(passlogfiles) },
"select two pass log file name prefix", "prefix" },
{ "deinterlace", OPT_VIDEO | OPT_EXPERT , { .func_arg = opt_deinterlace },
"this option is deprecated, use the yadif filter instead" },