Commit 42d1d06e authored by Stefano Sabatini's avatar Stefano Sabatini

Make more informative the error messages regarding the access to the

2-pass log file.

Originally committed as revision 15970 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent c2902c9c
...@@ -1841,7 +1841,7 @@ static int av_encode(AVFormatContext **output_files, ...@@ -1841,7 +1841,7 @@ static int av_encode(AVFormatContext **output_files,
if (codec->flags & CODEC_FLAG_PASS1) { if (codec->flags & CODEC_FLAG_PASS1) {
f = fopen(logfilename, "w"); f = fopen(logfilename, "w");
if (!f) { if (!f) {
perror(logfilename); fprintf(stderr, "Cannot write log file '%s' for pass-1 encoding: %s\n", logfilename, strerror(errno));
av_exit(1); av_exit(1);
} }
ost->logfile = f; ost->logfile = f;
...@@ -1849,7 +1849,7 @@ static int av_encode(AVFormatContext **output_files, ...@@ -1849,7 +1849,7 @@ static int av_encode(AVFormatContext **output_files,
/* read the log file */ /* read the log file */
f = fopen(logfilename, "r"); f = fopen(logfilename, "r");
if (!f) { if (!f) {
perror(logfilename); fprintf(stderr, "Cannot read log file '%s' for pass-2 encoding: %s\n", logfilename, strerror(errno));
av_exit(1); av_exit(1);
} }
fseek(f, 0, SEEK_END); fseek(f, 0, SEEK_END);
......
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