[FFmpeg-soc] [soc]: r5234 - in concat/libavformat: avplaylist.c avplaylist.h concatgen.c

gkovacs subversion at mplayerhq.hu
Mon Aug 24 07:37:54 CEST 2009


Author: gkovacs
Date: Mon Aug 24 07:37:54 2009
New Revision: 5234

Log:
rename AVPlaylistContext->icl to formatcontext_list

Modified:
   concat/libavformat/avplaylist.c
   concat/libavformat/avplaylist.h
   concat/libavformat/concatgen.c

Modified: concat/libavformat/avplaylist.c
==============================================================================
--- concat/libavformat/avplaylist.c	Mon Aug 24 07:31:01 2009	(r5233)
+++ concat/libavformat/avplaylist.c	Mon Aug 24 07:37:54 2009	(r5234)
@@ -53,17 +53,17 @@ AVFormatContext *av_playlist_alloc_forma
 
 void av_playlist_populate_context(AVPlaylistContext *ctx, int pe_curidx)
 {
-    ctx->icl = av_realloc(ctx->icl, sizeof(*(ctx->icl)) * (pe_curidx+2));
-    ctx->icl[pe_curidx+1] = NULL;
-    ctx->icl[pe_curidx] = av_playlist_alloc_formatcontext(ctx->flist[pe_curidx]);
-    ctx->nb_streams_list[pe_curidx] = ctx->icl[pe_curidx]->nb_streams;
+    ctx->formatcontext_list = av_realloc(ctx->formatcontext_list, sizeof(*(ctx->formatcontext_list)) * (pe_curidx+2));
+    ctx->formatcontext_list[pe_curidx+1] = NULL;
+    ctx->formatcontext_list[pe_curidx] = av_playlist_alloc_formatcontext(ctx->flist[pe_curidx]);
+    ctx->nb_streams_list[pe_curidx] = ctx->formatcontext_list[pe_curidx]->nb_streams;
 }
 
 void av_playlist_set_streams(AVFormatContext *s)
 {
     int i;
     AVPlaylistContext *ctx = s->priv_data;
-    AVFormatContext *ic = ctx->icl[ctx->pe_curidx];
+    AVFormatContext *ic = ctx->formatcontext_list[ctx->pe_curidx];
     int offset = av_playlist_streams_offset_from_playidx(ctx, ctx->pe_curidx);
     ic->iformat->read_header(ic, NULL);
     for (i = 0; i < ic->nb_streams; ++i) {

Modified: concat/libavformat/avplaylist.h
==============================================================================
--- concat/libavformat/avplaylist.h	Mon Aug 24 07:31:01 2009	(r5233)
+++ concat/libavformat/avplaylist.h	Mon Aug 24 07:37:54 2009	(r5234)
@@ -40,12 +40,12 @@
  *  @brief Represents the playlist and contains AVFormatContext for each playlist item.
  */
 typedef struct AVPlaylistContext {
-    char **flist;          /**< List of file names for each playlist item */
-    AVFormatContext **icl; /**< List of FormatContext for each playlist items */
-    int pelist_size;       /**< Number of playlist elements stored in icl */
-    int pe_curidx;         /**< Index of the AVFormatContext in icl that packets are being read from */
-    int64_t *durations;    /**< Durations, in AV_TIME_BASE units, for each playlist item */
-    int *nb_streams_list;  /**< List of the number of streams in each playlist item*/
+    char **flist;                         /**< List of file names for each playlist item */
+    AVFormatContext **formatcontext_list; /**< List of AVFormatContext for each playlist items */
+    int pelist_size;                      /**< Number of playlist elements stored in icl */
+    int pe_curidx;                        /**< Index of the AVFormatContext in icl that packets are being read from */
+    int64_t *durations;                   /**< Durations, in AV_TIME_BASE units, for each playlist item */
+    int *nb_streams_list;                 /**< List of the number of streams in each playlist item*/
 } AVPlaylistContext;
 
 /** @brief Allocates and opens file, codecs, and streams associated with filename.

Modified: concat/libavformat/concatgen.c
==============================================================================
--- concat/libavformat/concatgen.c	Mon Aug 24 07:31:01 2009	(r5233)
+++ concat/libavformat/concatgen.c	Mon Aug 24 07:37:54 2009	(r5234)
@@ -41,7 +41,7 @@ int ff_concatgen_read_packet(AVFormatCon
     ctx = s->priv_data;
     stream_index = 0;
     for (;;) {
-        ic = ctx->icl[ctx->pe_curidx];
+        ic = ctx->formatcontext_list[ctx->pe_curidx];
         av_init_packet(pkt);
         if (s->packet_buffer) {
             *pkt = s->packet_buffer->pkt;
@@ -105,7 +105,7 @@ int ff_concatgen_read_seek(AVFormatConte
     AVPlaylistContext *ctx;
     AVFormatContext *ic;
     ctx = s->priv_data;
-    ic = ctx->icl[ctx->pe_curidx];
+    ic = ctx->formatcontext_list[ctx->pe_curidx];
     ctx->durations[ctx->pe_curidx] = ic->duration;
     pts_avtimebase = av_rescale_q(pts,
                                   ic->streams[stream_index]->time_base,
@@ -115,7 +115,7 @@ int ff_concatgen_read_seek(AVFormatConte
                                                         &localpts_avtimebase);
     av_playlist_populate_context(ctx, ctx->pe_curidx);
     av_playlist_set_streams(s);
-    ic = ctx->icl[ctx->pe_curidx];
+    ic = ctx->formatcontext_list[ctx->pe_curidx];
     localpts = av_rescale_q(localpts_avtimebase,
                             AV_TIME_BASE_Q,
                             ic->streams[stream_index]->time_base);
@@ -133,7 +133,7 @@ int64_t ff_concatgen_read_timestamp(AVFo
     AVPlaylistContext *ctx;
     AVFormatContext *ic;
     ctx = s->priv_data;
-    ic = ctx->icl[ctx->pe_curidx];
+    ic = ctx->formatcontext_list[ctx->pe_curidx];
     if (ic->iformat->read_timestamp)
         return ic->iformat->read_timestamp(ic, stream_index, pos, pos_limit);
     return 0;
@@ -144,7 +144,7 @@ int ff_concatgen_read_close(AVFormatCont
     AVPlaylistContext *ctx;
     AVFormatContext *ic;
     ctx = s->priv_data;
-    ic = ctx->icl[ctx->pe_curidx];
+    ic = ctx->formatcontext_list[ctx->pe_curidx];
     if (ic->iformat->read_close)
         return ic->iformat->read_close(ic);
     return 0;
@@ -155,7 +155,7 @@ int ff_concatgen_read_play(AVFormatConte
     AVPlaylistContext *ctx;
     AVFormatContext *ic;
     ctx = s->priv_data;
-    ic = ctx->icl[ctx->pe_curidx];
+    ic = ctx->formatcontext_list[ctx->pe_curidx];
     return av_read_play(ic);
 }
 
@@ -164,6 +164,6 @@ int ff_concatgen_read_pause(AVFormatCont
     AVPlaylistContext *ctx;
     AVFormatContext *ic;
     ctx = s->priv_data;
-    ic = ctx->icl[ctx->pe_curidx];
+    ic = ctx->formatcontext_list[ctx->pe_curidx];
     return av_read_pause(ic);
 }


More information about the FFmpeg-soc mailing list