lavf/audiointerleave: check for allocation failure
authorLukasz Marek <lukasz.m.luki2@gmail.com>
Sun, 11 May 2014 03:33:56 +0000 (05:33 +0200)
committerLukasz Marek <lukasz.m.luki2@gmail.com>
Mon, 19 May 2014 22:00:45 +0000 (00:00 +0200)
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
libavformat/audiointerleave.c

index 1243f43..97bd801 100644 (file)
@@ -67,7 +67,8 @@ int ff_audio_interleave_init(AVFormatContext *s,
             aic->time_base = time_base;
 
             aic->fifo_size = 100* *aic->samples;
-            aic->fifo= av_fifo_alloc_array(100, *aic->samples);
+            if (!(aic->fifo= av_fifo_alloc_array(100, *aic->samples)))
+                return AVERROR(ENOMEM);
         }
     }