Lines Matching refs:anm
63 static int find_record(const AnmDemuxContext *anm, int record)
67 if (record >= anm->nb_records)
71 const Page *p = &anm->pt[i];
82 AnmDemuxContext *anm = s->priv_data;
93 anm->nb_pages = avio_rl16(pb);
94 anm->nb_records = avio_rl32(pb);
96 anm->page_table_offset = avio_rl16(pb);
115 anm->nb_records = FFMAX(anm->nb_records - 1, 0);
147 ret = avio_seek(pb, anm->page_table_offset, SEEK_SET);
152 Page *p = &anm->pt[i];
159 anm->page = find_record(anm, 0);
160 if (anm->page < 0) {
161 ret = anm->page;
165 anm->record = -1;
179 AnmDemuxContext *anm = s->priv_data;
187 if (anm->page < 0)
188 return anm->page;
191 p = &anm->pt[anm->page];
194 if (anm->record < 0) {
195 avio_seek(pb, anm->page_table_offset + MAX_PAGES*6 + (anm->page<<16), SEEK_SET);
197 anm->record = 0;
202 if (anm->record >= p->nb_records) {
203 anm->page = find_record(anm, p->base_record + p->nb_records);
204 if (anm->page < 0)
205 return anm->page;
206 anm->record = -1;
212 avio_seek(pb, anm->page_table_offset + MAX_PAGES*6 + (anm->page<<16) +
213 8 + anm->record * 2, SEEK_SET);
221 if (p->base_record + anm->record == 0)
224 anm->record++;
229 .name = "anm",