# HG changeset patch # User michael # Date 1211548078 0 # Node ID b228cfb5a4f5d9990be90f1b36506dd24b55030d # Parent 87e48733847c649bcb89074de7355aa7421e36f3 s/num_chapters/nb_chapters/ all other similar variables are called nb_*. diff -r 87e48733847c -r b228cfb5a4f5 avformat.h --- a/avformat.h Fri May 23 13:04:12 2008 +0000 +++ b/avformat.h Fri May 23 13:07:58 2008 +0000 @@ -522,7 +522,7 @@ */ unsigned int max_picture_buffer; - int num_chapters; + int nb_chapters; AVChapter **chapters; } AVFormatContext; diff -r 87e48733847c -r b228cfb5a4f5 utils.c --- a/utils.c Fri May 23 13:04:12 2008 +0000 +++ b/utils.c Fri May 23 13:07:58 2008 +0000 @@ -2148,9 +2148,9 @@ 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); @@ -2239,7 +2239,7 @@ AVChapter *chapter = NULL; int i; - for(i=0; inum_chapters; i++) + for(i=0; inb_chapters; i++) if(s->chapters[i]->id == id) chapter = s->chapters[i]; @@ -2247,7 +2247,7 @@ 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);