| @@ -207,7 +207,7 @@ static int do_hex_dump = 0; · 206 unmodified lines |
| 207 | 207 | static int do_pkt_dump = 0; |
| 208 | 208 | static int do_psnr = 0; |
| 209 | 209 | static int do_pass = 0; |
| 210 | | −static char *pass_logfilename_prefix = NULL; |
| 210 | +static const char *pass_logfilename_prefix; |
| 211 | 211 | static int audio_stream_copy = 0; |
| 212 | 212 | static int video_stream_copy = 0; |
| 213 | 213 | static int subtitle_stream_copy = 0; |
| @@ -2331,7 +2331,7 @@ static int transcode(AVFormatContext **output_files, · 2117 unmodified lines |
| 2331 | 2331 | break; |
| 2332 | 2332 | } |
| 2333 | 2333 | /* two pass mode */ |
| 2334 | | − if (ost->encoding_needed && |
| 2334 | + if (ost->encoding_needed && codec->codec_id != CODEC_ID_H264 && |
| 2335 | 2335 | (codec->flags & (CODEC_FLAG_PASS1 | CODEC_FLAG_PASS2))) { |
| 2336 | 2336 | char logfilename[1024]; |
| 2337 | 2337 | FILE *f; |
| @@ -4268,6 +4268,12 @@ static void log_callback_null(void* ptr, int level, const char* fmt, va_list vl) · 1930 unmodified lines |
| 4268 | 4268 | { |
| 4269 | 4269 | } |
| 4270 | 4270 | |
| 4271 | +static void opt_passlogfile(const char *arg) |
| 4272 | +{ |
| 4273 | + pass_logfilename_prefix = arg; |
| 4274 | + opt_default("passlogfile", arg); |
| 4275 | +} |
| 4276 | + |
| 4271 | 4277 | static const OptionDef options[] = { |
| 4272 | 4278 | /* main options */ |
| 4273 | 4279 | #include "cmdutils_common_opts.h" |
| @@ -4341,7 +4347,7 @@ static const OptionDef options[] = { · 67 unmodified lines |
| 4341 | 4347 | { "sameq", OPT_BOOL | OPT_VIDEO, {(void*)&same_quality}, |
| 4342 | 4348 | "use same quantizer as source (implies VBR)" }, |
| 4343 | 4349 | { "pass", HAS_ARG | OPT_FUNC2 | OPT_VIDEO, {(void*)opt_pass}, "select the pass number (1 or 2)", "n" }, |
| 4344 | | − { "passlogfile", HAS_ARG | OPT_STRING | OPT_VIDEO, {(void*)&pass_logfilename_prefix}, "select two pass log file name prefix", "prefix" }, |
| 4350 | + { "passlogfile", HAS_ARG | OPT_VIDEO, {(void*)&opt_passlogfile}, "select two pass log file name prefix", "prefix" }, |
| 4345 | 4351 | { "deinterlace", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&do_deinterlace}, |
| 4346 | 4352 | "deinterlace pictures" }, |
| 4347 | 4353 | { "psnr", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&do_psnr}, "calculate PSNR of compressed frames" }, |