s/num_chapters/nb_chapters/ all other similar variables are called nb_*.
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 23 May 2008 13:07:58 +0000 (13:07 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 23 May 2008 13:07:58 +0000 (13:07 +0000)
Originally committed as revision 13260 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/avformat.h
libavformat/utils.c

index a2e0978e9d003e88947ed53d83f0074dddbf2df5..8774b7366a9715e2588e529b1593960bd67c3a88 100644 (file)
@@ -522,7 +522,7 @@ typedef struct AVFormatContext {
      */
     unsigned int max_picture_buffer;
 
-    int num_chapters;
+    int nb_chapters;
     AVChapter **chapters;
 } AVFormatContext;
 
index 7986d49d323bd081c348e4599fc6de941d43e177..5f5909bd1da6338f8b078668e352b97a271b8371 100644 (file)
@@ -2148,9 +2148,9 @@ void av_close_input_stream(AVFormatContext *s)
     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 @@ int ff_new_chapter(AVFormatContext *s, int id, int64_t start, int64_t end, const
     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];
 
@@ -2247,7 +2247,7 @@ int ff_new_chapter(AVFormatContext *s, int id, int64_t start, int64_t end, const
         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);