[FFmpeg-soc] [soc]: r5288 - in concat/libavformat: avplaylist.c avplaylist.h playlist.c

gkovacs subversion at mplayerhq.hu
Wed Aug 26 07:51:20 CEST 2009


Author: gkovacs
Date: Wed Aug 26 07:51:19 2009
New Revision: 5288

Log:
use unsigned int for nb_streams_list since AVFormatContext->nb_streams is unsigned

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

Modified: concat/libavformat/avplaylist.c
==============================================================================
--- concat/libavformat/avplaylist.c	Wed Aug 26 07:47:59 2009	(r5287)
+++ concat/libavformat/avplaylist.c	Wed Aug 26 07:51:19 2009	(r5288)
@@ -102,7 +102,7 @@ int av_playlist_add_filelist(AVPlaylistC
 int av_playlist_add_path(AVPlaylistContext *ctx, const char *itempath)
 {
     int64_t *durations_tmp;
-    int *nb_streams_list_tmp;
+    unsigned int *nb_streams_list_tmp;
     char **flist_tmp;
     flist_tmp = av_realloc(ctx->flist, sizeof(*(ctx->flist)) * (++ctx->pelist_size+1));
     if (!flist_tmp) {
@@ -175,7 +175,7 @@ int av_playlist_stream_index_from_time(A
 
 int av_playlist_localstidx_from_streamidx(AVPlaylistContext *ctx, int stream_index)
 {
-    int i, cur, prev;
+    unsigned int i, cur, prev;
     cur = prev = 0;
     for (i = 0; stream_index >= cur; ++i) {
         prev = cur;

Modified: concat/libavformat/avplaylist.h
==============================================================================
--- concat/libavformat/avplaylist.h	Wed Aug 26 07:47:59 2009	(r5287)
+++ concat/libavformat/avplaylist.h	Wed Aug 26 07:51:19 2009	(r5288)
@@ -45,7 +45,7 @@ typedef struct AVPlaylistContext {
     int pelist_size;                       /**< Number of playlist elements stored in formatcontext_list */
     int pe_curidx;                         /**< Index of the AVFormatContext in formatcontext_list that packets are being read from */
     int64_t *durations;                    /**< Sum of previous durations, in AV_TIME_BASE units, for each playlist item */
-    int *nb_streams_list;                  /**< Sum of previous number of streams in each playlist item*/
+    unsigned int *nb_streams_list;         /**< Sum of current and previous number of streams in each playlist item*/
     AVFormatContext *master_formatcontext; /**< Parent AVFormatContext of which priv_data is this playlist. NULL if playlist is used standalone. */
 } AVPlaylistContext;
 

Modified: concat/libavformat/playlist.c
==============================================================================
--- concat/libavformat/playlist.c	Wed Aug 26 07:47:59 2009	(r5287)
+++ concat/libavformat/playlist.c	Wed Aug 26 07:51:19 2009	(r5288)
@@ -94,12 +94,12 @@ int ff_playlist_populate_context(AVPlayl
 
 int ff_playlist_set_streams(AVPlaylistContext *ctx)
 {
-    int i;
+    unsigned int i;
     AVFormatContext *s, *ic;
     if (!(s = ctx->master_formatcontext))
         return 0;
     ic = ctx->formatcontext_list[ctx->pe_curidx];
-    int offset = 0;
+    unsigned int offset = 0;
     if (ctx->pe_curidx > 0)
         offset = ctx->nb_streams_list[ctx->pe_curidx - 1];
     ic->iformat->read_header(ic, NULL);


More information about the FFmpeg-soc mailing list