diff options
author | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-06-02 23:17:48 -0400 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-28 02:33:56 +0200 |
commit | 3dc303a05192b2a7863b4ce4df10646b501ebe4e (patch) | |
tree | aa29c4ce6464d94c8f642c2813262acd73567606 /libswresample/swresample.c | |
parent | 42c54f8f4dd9b43dcb9cfc484b9f5ce82d1a812e (diff) | |
download | ffmpeg-3dc303a05192b2a7863b4ce4df10646b501ebe4e.tar.gz |
swresample/dither: check memory allocation
check memory allocation in swri_get_dither()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 196b885a5f0aa3ca022c1fa99509f47341239784)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/swresample.c')
-rw-r--r-- | libswresample/swresample.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c index c5ac1b35b6..2cd9d45420 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -628,7 +628,8 @@ static int swr_convert_internal(struct SwrContext *s, AudioData *out, int out_co return ret; if(ret) for(ch=0; ch<s->dither.noise.ch_count; ch++) - swri_get_dither(s, s->dither.noise.ch[ch], s->dither.noise.count, 12345678913579<<ch, s->dither.noise.fmt); + if((ret=swri_get_dither(s, s->dither.noise.ch[ch], s->dither.noise.count, 12345678913579<<ch, s->dither.noise.fmt))<0) + return ret; av_assert0(s->dither.noise.ch_count == preout->ch_count); if(s->dither.noise_pos + out_count > s->dither.noise.count) |