]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Make more informative the error messages regarding the access to the
authorstefano <stefano@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Mon, 1 Dec 2008 08:35:07 +0000 (08:35 +0000)
committerstefano <stefano@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Mon, 1 Dec 2008 08:35:07 +0000 (08:35 +0000)
2-pass log file.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@15970 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

ffmpeg.c

index e85b7a1d5a4eaf911a3f24f5010c89ba6e1fea91..55c8d38739a139ed7cf9cb5c98802c202ee80d12 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1841,7 +1841,7 @@ static int av_encode(AVFormatContext **output_files,
                 if (codec->flags & CODEC_FLAG_PASS1) {
                     f = fopen(logfilename, "w");
                     if (!f) {
-                        perror(logfilename);
+                        fprintf(stderr, "Cannot write log file '%s' for pass-1 encoding: %s\n", logfilename, strerror(errno));
                         av_exit(1);
                     }
                     ost->logfile = f;
@@ -1849,7 +1849,7 @@ static int av_encode(AVFormatContext **output_files,
                     /* read the log file */
                     f = fopen(logfilename, "r");
                     if (!f) {
-                        perror(logfilename);
+                        fprintf(stderr, "Cannot read log file '%s' for pass-2 encoding: %s\n", logfilename, strerror(errno));
                         av_exit(1);
                     }
                     fseek(f, 0, SEEK_END);