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:
1818a11
)
svq1enc: check ff_get_buffer() return value
author
Michael Niedermayer
<michaelni@gmx.at>
Thu, 13 Dec 2012 13:20:24 +0000
(14:20 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Thu, 13 Dec 2012 13:20:24 +0000
(14:20 +0100)
Fixes CID747723
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/svq1enc.c
patch
|
blob
|
history
diff --git
a/libavcodec/svq1enc.c
b/libavcodec/svq1enc.c
index
216fa3b
..
2850ab0
100644
(file)
--- a/
libavcodec/svq1enc.c
+++ b/
libavcodec/svq1enc.c
@@
-547,8
+547,10
@@
static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
}
if (!s->current_picture.data[0]) {
- ff_get_buffer(avctx, &s->current_picture);
- ff_get_buffer(avctx, &s->last_picture);
+ if ((ret = ff_get_buffer(avctx, &s->current_picture) < 0) ||
+ (ret = ff_get_buffer(avctx, &s->last_picture)) < 0) {
+ return ret;
+ }
s->scratchbuf = av_malloc(s->current_picture.linesize[0] * 16 * 2);
}