Make DeluxePaint Animation demuxer actually return the find_record() error code ...
authorPeter Ross <pross@xvid.org>
Fri, 12 Feb 2010 11:31:35 +0000 (11:31 +0000)
committerPeter Ross <pross@xvid.org>
Fri, 12 Feb 2010 11:31:35 +0000 (11:31 +0000)
Originally committed as revision 21769 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/anm.c

index b80e429..2099dc9 100644 (file)
@@ -39,7 +39,7 @@ typedef struct {
     int page_table_offset;
 #define MAX_PAGES  256        /** Deluxe Paint hardcoded value */
     Page pt[MAX_PAGES];       /** page table */
-    int page;                 /** current page */
+    int page;                 /** current page (or AVERROR_xxx code) */
     int record;               /** current record (with in page) */
 } AnmDemuxContext;
 
@@ -185,7 +185,7 @@ static int read_packet(AVFormatContext *s,
         return AVERROR(EIO);
 
     if (anm->page < 0)
-        return 0;
+        return anm->page;
 
 repeat:
     p = &anm->pt[anm->page];