1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

takdec: check av_samples_get_buffer_size() return value

CC: libav-stable@libav.org
Bug-Id: CID 747734
This commit is contained in:
Vittorio Giovara 2014-12-17 15:19:42 +01:00
parent 16c7a8a142
commit 5ac06633cb

View File

@ -748,6 +748,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);