Author: gkovacs
Date: Sun Aug 30 01:27:51 2009
New Revision: 5369

Log:
provide error message when av_playlist_remove_item is invoked with an item 
index outside the playlist's size

Modified:
   concat/libavformat/avplaylist.c

Modified: concat/libavformat/avplaylist.c
==============================================================================
--- concat/libavformat/avplaylist.c     Sun Aug 30 01:23:52 2009        (r5368)
+++ concat/libavformat/avplaylist.c     Sun Aug 30 01:27:51 2009        (r5369)
@@ -139,8 +139,12 @@ int av_playlist_remove_item(AVPlaylistCo
     unsigned int *nb_streams_list_tmp;
     AVFormatContext **formatcontext_list_tmp;
     char **flist_tmp;
-    if (pos >= ctx->pelist_size || !ctx->flist || !ctx->durations || 
!ctx->nb_streams_list)
+    if (pos >= ctx->pelist_size || !ctx->flist || !ctx->durations || 
!ctx->nb_streams_list) {
+        av_log(NULL, AV_LOG_ERROR,
+               "failed to remove item %d which is not present in playlist\n",
+               pos);
         return AVERROR_INVALIDDATA;
+    }
     --ctx->pelist_size;
     av_free(ctx->flist[pos]);
     for (i = pos; i < ctx->pelist_size; ++i)
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc

Reply via email to