[FFmpeg-cvslog] r22973 - trunk/ffmpeg.c

stefano subversion
Tue Apr 27 00:36:55 CEST 2010


Author: stefano
Date: Tue Apr 27 00:36:55 2010
New Revision: 22973

Log:
Make ffmpeg use print_error() to make apparent the exact cause of
failure happened when trying to open the output file.

Modified:
   trunk/ffmpeg.c

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	Tue Apr 27 00:36:51 2010	(r22972)
+++ trunk/ffmpeg.c	Tue Apr 27 00:36:55 2010	(r22973)
@@ -3447,7 +3447,7 @@ static void opt_new_subtitle_stream(void
 static void opt_output_file(const char *filename)
 {
     AVFormatContext *oc;
-    int use_video, use_audio, use_subtitle;
+    int err, use_video, use_audio, use_subtitle;
     int input_has_video, input_has_audio, input_has_subtitle;
     AVFormatParameters params, *ap = ¶ms;
     AVOutputFormat *file_oformat;
@@ -3572,8 +3572,8 @@ static void opt_output_file(const char *
         }
 
         /* open the file */
-        if (url_fopen(&oc->pb, filename, URL_WRONLY) < 0) {
-            fprintf(stderr, "Could not open '%s'\n", filename);
+        if ((err = url_fopen(&oc->pb, filename, URL_WRONLY)) < 0) {
+            print_error(filename, err);
             av_exit(1);
         }
     }



More information about the ffmpeg-cvslog mailing list