Lines Matching defs:chapter_idx
49 int chapter_idx;
215 unsigned chapter_idx = s->nb_chapters;
219 chapter_pos -= start + CHAPTER_HEADER_SIZE * chapter_idx;
221 if (!avpriv_new_chapter(s, chapter_idx, st->time_base,
254 av_log(s, AV_LOG_DEBUG, "Chapter %d (%" PRId64 " bytes)\n", c->chapter_idx, c->current_chapter_size);
255 c->chapter_idx = c->chapter_idx + 1;
294 int chapter_idx = 0;
300 while (chapter_idx < s->nb_chapters && timestamp >= s->chapters[chapter_idx]->end) {
301 ++chapter_idx;
304 if (chapter_idx >= s->nb_chapters) {
305 chapter_idx = s->nb_chapters - 1;
306 if (chapter_idx < 0) return -1; // there is no chapter.
307 timestamp = s->chapters[chapter_idx]->end;
310 ch = s->chapters[chapter_idx];
320 chapter_start = c->content_start + (ch->start / TIMEPREC) + CHAPTER_HEADER_SIZE * (1 + chapter_idx);
326 c->chapter_idx = 1 + chapter_idx;