diff utils.c @ 3328:b228cfb5a4f5 libavformat

s/num_chapters/nb_chapters/ all other similar variables are called nb_*.
author michael
date Fri, 23 May 2008 13:07:58 +0000
parents 87e48733847c
children 374e74567a4e
line wrap: on
line diff
--- 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; 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 @@
         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);