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:
3e99b37
)
avcodec/shorten: if allocation fails reset max_frame_size
author
Paul B Mahol
<onemda@gmail.com>
Fri, 8 Apr 2016 07:59:05 +0000
(09:59 +0200)
committer
Paul B Mahol
<onemda@gmail.com>
Fri, 8 Apr 2016 07:59:05 +0000
(09:59 +0200)
Otherwise crash happens.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/shorten.c
patch
|
blob
|
history
diff --git
a/libavcodec/shorten.c
b/libavcodec/shorten.c
index
9da04eb
..
1d22a24
100644
(file)
--- a/
libavcodec/shorten.c
+++ b/
libavcodec/shorten.c
@@
-436,6
+436,7
@@
static int shorten_decode_frame(AVCodecContext *avctx, void *data,
tmp_ptr = av_fast_realloc(s->bitstream, &s->allocated_bitstream_size,
s->max_framesize + AV_INPUT_BUFFER_PADDING_SIZE);
if (!tmp_ptr) {
+ s->max_framesize = 0;
av_log(avctx, AV_LOG_ERROR, "error allocating bitstream buffer\n");
return AVERROR(ENOMEM);
}