av_freep(&s->programs);
flush_packet_queue(s);
av_freep(&s->priv_data);
- while(s->num_chapters--) {
- av_free(s->chapters[s->num_chapters]->title);
- av_free(s->chapters[s->num_chapters]);
+ while(s->nb_chapters--) {
+ av_free(s->chapters[s->nb_chapters]->title);
+ av_free(s->chapters[s->nb_chapters]);
}
av_freep(&s->chapters);
av_free(s);
AVChapter *chapter = NULL;
int i;
- for(i=0; i<s->num_chapters; i++)
+ for(i=0; i<s->nb_chapters; i++)
if(s->chapters[i]->id == id)
chapter = s->chapters[i];
chapter= av_mallocz(sizeof(AVChapter));
if(!chapter)
return AVERROR(ENOMEM);
- dynarray_add(&s->chapters, &s->num_chapters, chapter);
+ dynarray_add(&s->chapters, &s->nb_chapters, chapter);
}
if(chapter->title)
av_free(chapter->title);