[FFmpeg-cvslog] cavsdec: check ff_get_buffer() return value
Michael Niedermayer
git at videolan.org
Thu Dec 13 14:46:52 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Dec 13 14:32:58 2012 +0100| [eee8c94f50bfcd93c1f761b4e6b55bec3815616d] | committer: Michael Niedermayer
cavsdec: check ff_get_buffer() return value
Fixes CID747721
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eee8c94f50bfcd93c1f761b4e6b55bec3815616d
---
libavcodec/cavsdec.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index 34eeabd..cf86ab4 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -925,6 +925,7 @@ static inline int check_for_slice(AVSContext *h) {
static int decode_pic(AVSContext *h) {
MpegEncContext *s = &h->s;
int skip_count = -1;
+ int ret;
enum cavs_mb mb_type;
if (!s->context_initialized) {
@@ -963,7 +964,8 @@ static int decode_pic(AVSContext *h) {
if(h->picture.f.data[0])
s->avctx->release_buffer(s->avctx, &h->picture.f);
- ff_get_buffer(s->avctx, &h->picture.f);
+ if ((ret = ff_get_buffer(s->avctx, &h->picture.f)) < 0)
+ return ret;
ff_cavs_init_pic(h);
h->picture.poc = get_bits(&s->gb,8)*2;
More information about the ffmpeg-cvslog
mailing list