[FFmpeg-cvslog] r13260 - in trunk/libavformat: avformat.h utils.c

michael subversion
Fri May 23 15:07:59 CEST 2008


Author: michael
Date: Fri May 23 15:07:58 2008
New Revision: 13260

Log:
s/num_chapters/nb_chapters/ all other similar variables are called nb_*.


Modified:
   trunk/libavformat/avformat.h
   trunk/libavformat/utils.c

Modified: trunk/libavformat/avformat.h
==============================================================================
--- trunk/libavformat/avformat.h	(original)
+++ trunk/libavformat/avformat.h	Fri May 23 15:07:58 2008
@@ -522,7 +522,7 @@ typedef struct AVFormatContext {
      */
     unsigned int max_picture_buffer;
 
-    int num_chapters;
+    int nb_chapters;
     AVChapter **chapters;
 } AVFormatContext;
 

Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c	(original)
+++ trunk/libavformat/utils.c	Fri May 23 15:07:58 2008
@@ -2148,9 +2148,9 @@ void av_close_input_stream(AVFormatConte
     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, i
     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, 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);




More information about the ffmpeg-cvslog mailing list