Browse code

handle AVERROR_IO and AVERROR_NOMEM patch by (Kostya <cannonball bw-team com>)

Originally committed as revision 3853 to svn://svn.ffmpeg.org/ffmpeg/trunk

Kostya Shishkov authored on 2005/01/21 00:31:07
Showing 1 changed files
... ...
@@ -110,6 +110,14 @@ void print_error(const char *filename, int err)
110 110
     case AVERROR_NOFMT:
111 111
         fprintf(stderr, "%s: Unknown format\n", filename);
112 112
         break;
113
+    case AVERROR_IO:
114
+        fprintf(stderr, "%s: I/O error occured\n"
115
+	        "Usually that means that input file is truncated and/or corrupted.\n",
116
+		filename);
117
+        break;
118
+    case AVERROR_NOMEM:
119
+        fprintf(stderr, "%s: memory allocation error occured\n", filename);
120
+        break;
113 121
     default:
114 122
         fprintf(stderr, "%s: Error while opening file\n", filename);
115 123
         break;