Author: gkovacs
Date: Wed Aug 26 02:10:20 2009
New Revision: 5275
Log:
check for allocation failure in avformat_alloc_context
Modified:
concat/libavformat/avplaylist.c
Modified: concat/libavformat/avplaylist.c
==============================================================================
--- concat/libavformat/avplaylist.c Wed Aug 26 02:08:46 2009 (r5274)
+++ concat/libavformat/avplaylist.c Wed Aug 26 02:10:20 2009 (r5275)
@@ -41,6 +41,10 @@ AVFormatContext *av_playlist_alloc_forma
{
int err;
AVFormatContext *ic = avformat_alloc_context();
+ if (!ic) {
+ av_log(NULL, AV_LOG_ERROR, "unable to allocate AVFormatContext in
av_playlist_alloc_formatcontext\n");
+ return NULL;
+ }
err = av_open_input_file(&ic, filename, ic->iformat, 0, NULL);
if (err < 0) {
av_log(ic, AV_LOG_ERROR, "Error during av_open_input_file\n");
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc