mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
parent
6e8be949f1
commit
64334ddbbc
34
avconv.c
34
avconv.c
@ -2500,24 +2500,24 @@ static int transcode_init(OutputFile *output_files,
|
||||
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) {
|
||||
av_log(NULL, AV_LOG_FATAL, "Cannot write log file '%s' for pass-1 encoding: %s\n",
|
||||
logfilename, strerror(errno));
|
||||
exit_program(1);
|
||||
if (codec->flags & CODEC_FLAG_PASS1) {
|
||||
f = fopen(logfilename, "wb");
|
||||
if (!f) {
|
||||
av_log(NULL, AV_LOG_FATAL, "Cannot write log file '%s' for pass-1 encoding: %s\n",
|
||||
logfilename, strerror(errno));
|
||||
exit_program(1);
|
||||
}
|
||||
ost->logfile = f;
|
||||
} else {
|
||||
char *logbuffer;
|
||||
size_t logbuffer_size;
|
||||
if (cmdutils_read_file(logfilename, &logbuffer, &logbuffer_size) < 0) {
|
||||
av_log(NULL, AV_LOG_FATAL, "Error reading log file '%s' for pass-2 encoding\n",
|
||||
logfilename);
|
||||
exit_program(1);
|
||||
}
|
||||
codec->stats_in = logbuffer;
|
||||
}
|
||||
ost->logfile = f;
|
||||
} else {
|
||||
char *logbuffer;
|
||||
size_t logbuffer_size;
|
||||
if (cmdutils_read_file(logfilename, &logbuffer, &logbuffer_size) < 0) {
|
||||
av_log(NULL, AV_LOG_FATAL, "Error reading log file '%s' for pass-2 encoding\n",
|
||||
logfilename);
|
||||
exit_program(1);
|
||||
}
|
||||
codec->stats_in = logbuffer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user