diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-13 14:32:58 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-13 14:32:58 +0100 |
commit | eee8c94f50bfcd93c1f761b4e6b55bec3815616d (patch) | |
tree | 5de47553efb5e493d9e055dff34346df8836d169 /libavcodec/cavsdec.c | |
parent | 5cb080fa5e198303a14a537c9388855ccd0a669b (diff) | |
download | ffmpeg-eee8c94f50bfcd93c1f761b4e6b55bec3815616d.tar.gz |
cavsdec: check ff_get_buffer() return value
Fixes CID747721
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/cavsdec.c')
-rw-r--r-- | libavcodec/cavsdec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c index 34eeabdae2..cf86ab4c96 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; |