changeset 5652:7878a002f87d libavformat

Make DeluxePaint Animation demuxer actually return the find_record() error code (issue 1739).
author pross
date Fri, 12 Feb 2010 11:31:35 +0000
parents 399d973420de
children 25eca7e2cf64
files anm.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/anm.c	Fri Feb 12 01:37:53 2010 +0000
+++ b/anm.c	Fri Feb 12 11:31:35 2010 +0000
@@ -39,7 +39,7 @@
     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 @@
         return AVERROR(EIO);
 
     if (anm->page < 0)
-        return 0;
+        return anm->page;
 
 repeat:
     p = &anm->pt[anm->page];