summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 07c3ac41f4..47f9e1a255 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -644,7 +644,10 @@ static void do_audio_out(AVFormatContext *s,
/* now encode as many frames as possible */
if (enc->frame_size > 1) {
/* output resampled raw samples */
- av_fifo_realloc(&ost->fifo, av_fifo_size(&ost->fifo) + size_out);
+ if (av_fifo_realloc2(&ost->fifo, av_fifo_size(&ost->fifo) + size_out) < 0) {
+ fprintf(stderr, "av_fifo_realloc2() failed\n");
+ av_exit(1);
+ }
av_fifo_generic_write(&ost->fifo, buftmp, size_out, NULL);
frame_bytes = enc->frame_size * 2 * enc->channels;