aboutsummaryrefslogtreecommitdiffstats
path: root/avconv.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-03-12 17:42:57 +0100
committerAnton Khirnov <anton@khirnov.net>2012-03-13 12:21:14 +0100
commit6e8be949f12734f38d360aad0f5c503a0f9606fa (patch)
tree9413fb0499ec73a2e39d3b9d9aa4bf07e59515d7 /avconv.c
parentd533e395e14d403948ca2424efbcee92429ef8e1 (diff)
downloadffmpeg-6e8be949f12734f38d360aad0f5c503a0f9606fa.tar.gz
avconv: link '-passlogfile' option to libx264 'stats' AVOption.
Fixes bug 204. CC: libav-stable@libav.org
Diffstat (limited to 'avconv.c')
-rw-r--r--avconv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/avconv.c b/avconv.c
index 53a7661640..518f8b8c8e 100644
--- a/avconv.c
+++ b/avconv.c
@@ -2497,6 +2497,9 @@ static int transcode_init(OutputFile *output_files,
snprintf(logfilename, sizeof(logfilename), "%s-%d.log",
pass_logfilename_prefix ? pass_logfilename_prefix : DEFAULT_PASS_LOGFILENAME_PREFIX,
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) {
f = fopen(logfilename, "wb");
if (!f) {
@@ -2515,6 +2518,7 @@ static int transcode_init(OutputFile *output_files,
}
codec->stats_in = logbuffer;
}
+ }
}
}
}