aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2012-02-27 19:01:53 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2012-02-27 19:02:28 +0100
commit7b4e1466d4cb9283facd874fa109b6b3389b67e2 (patch)
tree0bd7a4234aa6d04c3e7a2ca5db5f128fbd4ee154 /ffmpeg.c
parenta4c22e3cac1aac61b6110753376b3a2bef4da0ec (diff)
downloadffmpeg-7b4e1466d4cb9283facd874fa109b6b3389b67e2.tar.gz
Exit ffmpeg if swr_convert() fails.
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index c90720105a..4bdca88c7a 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1267,6 +1267,10 @@ need_realloc:
buftmp = audio_buf;
size_out = swr_convert(ost->swr, ( uint8_t*[]){buftmp}, audio_buf_size / (enc->channels * osize),
(const uint8_t*[]){buf }, size / (dec->channels * isize));
+ if (size_out < 0) {
+ av_log(NULL, AV_LOG_FATAL, "swr_convert failed\n");
+ exit_program(1);
+ }
size_out = size_out * enc->channels * osize;
} else {
buftmp = buf;