comparison anm.c @ 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 47ef38389cd3
children 536e5527c1e0
comparison
equal deleted inserted replaced
5651:399d973420de 5652:7878a002f87d
37 unsigned int nb_pages; /** total pages in file */ 37 unsigned int nb_pages; /** total pages in file */
38 unsigned int nb_records; /** total records in file */ 38 unsigned int nb_records; /** total records in file */
39 int page_table_offset; 39 int page_table_offset;
40 #define MAX_PAGES 256 /** Deluxe Paint hardcoded value */ 40 #define MAX_PAGES 256 /** Deluxe Paint hardcoded value */
41 Page pt[MAX_PAGES]; /** page table */ 41 Page pt[MAX_PAGES]; /** page table */
42 int page; /** current page */ 42 int page; /** current page (or AVERROR_xxx code) */
43 int record; /** current record (with in page) */ 43 int record; /** current record (with in page) */
44 } AnmDemuxContext; 44 } AnmDemuxContext;
45 45
46 #define LPF_TAG MKTAG('L','P','F',' ') 46 #define LPF_TAG MKTAG('L','P','F',' ')
47 #define ANIM_TAG MKTAG('A','N','I','M') 47 #define ANIM_TAG MKTAG('A','N','I','M')
183 183
184 if (url_feof(s->pb)) 184 if (url_feof(s->pb))
185 return AVERROR(EIO); 185 return AVERROR(EIO);
186 186
187 if (anm->page < 0) 187 if (anm->page < 0)
188 return 0; 188 return anm->page;
189 189
190 repeat: 190 repeat:
191 p = &anm->pt[anm->page]; 191 p = &anm->pt[anm->page];
192 192
193 /* parse page header */ 193 /* parse page header */