From bbcedade008b5471c71122944cf4dee1951138ec Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 19 Aug 2012 09:15:48 +0200 Subject: avconv: make the -passlogfile option per-stream. --- avconv_opt.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'avconv_opt.c') 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" }, -- cgit v1.2.3