Do as the comment says and signal an error.
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 8 Dec 2009 14:50:46 +0000 (14:50 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 8 Dec 2009 14:50:46 +0000 (14:50 +0000)
Originally committed as revision 20770 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffmpeg.c

index 01b51e8..d1a00b8 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -583,8 +583,10 @@ static void do_audio_out(AVFormatContext *s,
 
     av_fast_malloc(&audio_buf, &allocated_audio_buf_size, audio_buf_size);
     av_fast_malloc(&audio_out, &allocated_audio_out_size, audio_out_size);
-    if (!audio_buf || !audio_out)
-        return;               /* Should signal an error ! */
+    if (!audio_buf || !audio_out){
+        fprintf(stderr, "Out of memory in do_audio_out\n");
+        av_exit(1);
+    }
 
     if (enc->channels != dec->channels)
         ost->audio_resample = 1;