diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-19 05:06:07 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-19 05:06:23 +0100 |
commit | d05b154b5b6d91ac625409542977a5c8a9a08a37 (patch) | |
tree | c254b89450720b05e58c274c53a9027178e8d0f5 /libavcodec/takdec.c | |
parent | 69234e29ad65d400752684640cc482278d423eb6 (diff) | |
parent | 5ac06633cb63fcc51f2471a3478b44d3f010b16b (diff) | |
download | ffmpeg-d05b154b5b6d91ac625409542977a5c8a9a08a37.tar.gz |
Merge commit '5ac06633cb63fcc51f2471a3478b44d3f010b16b'
* commit '5ac06633cb63fcc51f2471a3478b44d3f010b16b':
takdec: check av_samples_get_buffer_size() return value
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/takdec.c')
-rw-r--r-- | libavcodec/takdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c index 5810a01c24..2f0155d557 100644 --- a/libavcodec/takdec.c +++ b/libavcodec/takdec.c @@ -743,6 +743,8 @@ static int tak_decode_frame(AVCodecContext *avctx, void *data, int buf_size = av_samples_get_buffer_size(NULL, avctx->channels, s->nb_samples, AV_SAMPLE_FMT_S32P, 0); + if (buf_size < 0) + return buf_size; av_fast_malloc(&s->decode_buffer, &s->decode_buffer_size, buf_size); if (!s->decode_buffer) return AVERROR(ENOMEM); |