summaryrefslogtreecommitdiff
authorMichael Niedermayer <michaelni@gmx.at>2013-01-10 19:26:28 (GMT)
committer Michael Niedermayer <michaelni@gmx.at>2013-01-10 19:27:07 (GMT)
commita74548521b2348aea7dc3a69ce814dc7b0d6aca8 (patch)
tree8220dca2221aa827b21e73d4abc72a572777629b
parente5a736261bafb1bc5a4c51d614be63e0632b2e96 (diff)
downloadffmpeg-a74548521b2348aea7dc3a69ce814dc7b0d6aca8.zip
ffmpeg-a74548521b2348aea7dc3a69ce814dc7b0d6aca8.tar.gz
ffmpeg-a74548521b2348aea7dc3a69ce814dc7b0d6aca8.tar.bz2
swr: check that allocation of in/out_convert succeeded
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat
-rw-r--r--libswresample/swresample.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 4c971dc..badba7b 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -369,6 +369,8 @@ av_assert0(s->out.ch_count);
s->out_convert= swri_audio_convert_alloc(s->out_sample_fmt,
s->int_sample_fmt, s->out.ch_count, NULL, 0);
+ if (!s->in_convert || !s->out_convert)
+ return AVERROR(ENOMEM);
s->postin= s->in;
s->preout= s->out;