[FFmpeg-soc] [soc]: r4801 - concat/libavformat/playlist.c

gkovacs subversion at mplayerhq.hu
Fri Jul 24 02:56:25 CEST 2009


Author: gkovacs
Date: Fri Jul 24 02:56:25 2009
New Revision: 4801

Log:
ensure that flist and icl are always null-terminated

Modified:
   concat/libavformat/playlist.c

Modified: concat/libavformat/playlist.c
==============================================================================
--- concat/libavformat/playlist.c	Fri Jul 24 02:47:35 2009	(r4800)
+++ concat/libavformat/playlist.c	Fri Jul 24 02:56:25 2009	(r4801)
@@ -53,6 +53,7 @@ void ff_playlist_populate_context(AVForm
     AVFormatContext *ic;
     PlaylistContext *ctx = s->priv_data;
     ctx->icl = av_realloc(ctx->icl, sizeof(*(ctx->icl)) * (ctx->pe_curidx+1));
+    ctx->icl[ctx->pe_curidx+1] = NULL;
     ic = ctx->icl[ctx->pe_curidx] = ff_playlist_alloc_formatcontext(ctx->flist[ctx->pe_curidx]);
     ic->iformat->read_header(ic, 0);
     s->nb_streams = ic->nb_streams;
@@ -134,6 +135,7 @@ PlaylistContext *ff_playlist_from_encode
 void ff_playlist_add_path(PlaylistContext *ctx, char *itempath)
 {
     ctx->flist = av_realloc(ctx->flist, sizeof(*(ctx->flist)) * ++ctx->pelist_size);
+    ctx->flist[ctx->pelist_size] = NULL;
     ctx->flist[ctx->pelist_size-1] = itempath;
 }
 


More information about the FFmpeg-soc mailing list