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];
81 AnmDemuxContext *anm = s->priv_data;
92 anm->nb_pages = avio_rl16(pb);
93 anm->nb_records = avio_rl32(pb);
95 anm->page_table_offset = avio_rl16(pb);
114 anm->nb_records = FFMAX(anm->nb_records - 1, 0);
145 ret = avio_seek(pb, anm->page_table_offset, SEEK_SET);
150 Page *p = &anm->pt[i];
157 anm->page = find_record(anm, 0);
158 if (anm->page < 0) {
159 return anm->page;
162 anm->record = -1;
173 AnmDemuxContext *anm = s->priv_data;
181 if (anm->page < 0)
182 return anm->page;
185 p = &anm->pt[anm->page];
188 if (anm->record < 0) {
189 avio_seek(pb, anm->page_table_offset + MAX_PAGES*6 + (anm->page<<16), SEEK_SET);
191 anm->record = 0;
196 if (anm->record >= p->nb_records) {
197 anm->page = find_record(anm, p->base_record + p->nb_records);
198 if (anm->page < 0)
199 return anm->page;
200 anm->record = -1;
206 avio_seek(pb, anm->page_table_offset + MAX_PAGES*6 + (anm->page<<16) +
207 8 + anm->record * 2, SEEK_SET);
215 if (p->base_record + anm->record == 0)
218 anm->record++;
223 .name = "anm",