[FFmpeg-cvslog] r8977 - in trunk: cmdutils.c libavformat/utils.c

benoit subversion
Thu May 10 15:25:33 CEST 2007


Author: benoit
Date: Thu May 10 15:25:33 2007
New Revision: 8977

Log:

Use url_fopen error code when opening input file
handle the AVERROR_NOENT error case in print_error



Modified:
   trunk/cmdutils.c
   trunk/libavformat/utils.c

Modified: trunk/cmdutils.c
==============================================================================
--- trunk/cmdutils.c	(original)
+++ trunk/cmdutils.c	Thu May 10 15:25:33 2007
@@ -138,6 +138,9 @@ void print_error(const char *filename, i
     case AVERROR_NOMEM:
         fprintf(stderr, "%s: memory allocation error occured\n", filename);
         break;
+    case AVERROR_NOENT:
+        fprintf(stderr, "%s: no such file or directory\n", filename);
+        break;
     default:
         fprintf(stderr, "%s: Error while opening file\n", filename);
         break;

Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c	(original)
+++ trunk/libavformat/utils.c	Thu May 10 15:25:33 2007
@@ -417,8 +417,7 @@ int av_open_input_file(AVFormatContext *
 
     if (!fmt || must_open_file) {
         /* if no file needed do not try to open one */
-        if (url_fopen(pb, filename, URL_RDONLY) < 0) {
-            err = AVERROR_IO;
+        if ((err=url_fopen(pb, filename, URL_RDONLY)) < 0) {
             goto fail;
         }
         file_opened = 1;




More information about the ffmpeg-cvslog mailing list