aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-04-26 22:36:55 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-04-26 22:36:55 +0000
commita31e7956078e5039cc8a19985e4432ff94ebb0ff (patch)
tree254f932058448505c98a4fb07c9a1e01258db324
parentec6791736c94af12ec49010cdbc98d1f10ef7de0 (diff)
downloadffmpeg-a31e7956078e5039cc8a19985e4432ff94ebb0ff.tar.gz
Make ffmpeg use print_error() to make apparent the exact cause of
failure happened when trying to open the output file. Originally committed as revision 22973 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--ffmpeg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 36eefe1c80..be18065413 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -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 = &params;
AVOutputFormat *file_oformat;
@@ -3572,8 +3572,8 @@ static void opt_output_file(const char *filename)
}
/* 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);
}
}