Commit 6e8be949 authored by Anton Khirnov's avatar Anton Khirnov

avconv: link '-passlogfile' option to libx264 'stats' AVOption.

Fixes bug 204.

CC: libav-stable@libav.org
parent d533e395
...@@ -2497,6 +2497,9 @@ static int transcode_init(OutputFile *output_files, ...@@ -2497,6 +2497,9 @@ static int transcode_init(OutputFile *output_files,
snprintf(logfilename, sizeof(logfilename), "%s-%d.log", snprintf(logfilename, sizeof(logfilename), "%s-%d.log",
pass_logfilename_prefix ? pass_logfilename_prefix : DEFAULT_PASS_LOGFILENAME_PREFIX, pass_logfilename_prefix ? pass_logfilename_prefix : DEFAULT_PASS_LOGFILENAME_PREFIX,
i); i);
if (!strcmp(ost->enc->name, "libx264")) {
av_dict_set(&ost->opts, "stats", logfilename, AV_DICT_DONT_OVERWRITE);
} else {
if (codec->flags & CODEC_FLAG_PASS1) { if (codec->flags & CODEC_FLAG_PASS1) {
f = fopen(logfilename, "wb"); f = fopen(logfilename, "wb");
if (!f) { if (!f) {
...@@ -2515,6 +2518,7 @@ static int transcode_init(OutputFile *output_files, ...@@ -2515,6 +2518,7 @@ static int transcode_init(OutputFile *output_files,
} }
codec->stats_in = logbuffer; codec->stats_in = logbuffer;
} }
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment