changeset 4947:41d709e71f5f libavformat

check av_fifo_alloc return
author bcoudurier
date Thu, 21 May 2009 23:12:41 +0000
parents 67974323f1cf
children 09e81ac02d25
files swfenc.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/swfenc.c	Thu May 21 22:33:17 2009 +0000
+++ b/swfenc.c	Thu May 21 23:12:41 2009 +0000
@@ -193,6 +193,8 @@
                 }
                 swf->audio_enc = enc;
                 swf->audio_fifo= av_fifo_alloc(AUDIO_FIFO_SIZE);
+                if (!swf->audio_fifo)
+                    return AVERROR(ENOMEM);
             } else {
                 av_log(s, AV_LOG_ERROR, "SWF muxer only supports MP3\n");
                 return -1;