handle AVERROR_IO and AVERROR_NOMEM patch by (Kostya <cannonball bw-team com>)
authorKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 20 Jan 2005 15:31:07 +0000 (15:31 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 20 Jan 2005 15:31:07 +0000 (15:31 +0000)
Originally committed as revision 3853 to svn://svn.ffmpeg.org/ffmpeg/trunk

cmdutils.c

index 16067cb..955b485 100644 (file)
@@ -110,6 +110,14 @@ void print_error(const char *filename, int err)
     case AVERROR_NOFMT:
         fprintf(stderr, "%s: Unknown format\n", filename);
         break;
+    case AVERROR_IO:
+        fprintf(stderr, "%s: I/O error occured\n"
+               "Usually that means that input file is truncated and/or corrupted.\n",
+               filename);
+        break;
+    case AVERROR_NOMEM:
+        fprintf(stderr, "%s: memory allocation error occured\n", filename);
+        break;
     default:
         fprintf(stderr, "%s: Error while opening file\n", filename);
         break;