OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16c7a8a
)
takdec: check av_samples_get_buffer_size() return value
author
Vittorio Giovara
<vittorio.giovara@gmail.com>
Wed, 17 Dec 2014 14:19:42 +0000
(15:19 +0100)
committer
Vittorio Giovara
<vittorio.giovara@gmail.com>
Thu, 18 Dec 2014 22:27:14 +0000
(23:27 +0100)
CC: libav-stable@libav.org
Bug-Id: CID 747734
libavcodec/takdec.c
patch
|
blob
|
history
diff --git
a/libavcodec/takdec.c
b/libavcodec/takdec.c
index
b0e84ea
..
16ccdba
100644
(file)
--- a/
libavcodec/takdec.c
+++ b/
libavcodec/takdec.c
@@
-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);