mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
cavsdec: check ff_get_buffer() return value
Fixes CID747721 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
5cb080fa5e
commit
eee8c94f50
@ -925,6 +925,7 @@ static inline int check_for_slice(AVSContext *h) {
|
|||||||
static int decode_pic(AVSContext *h) {
|
static int decode_pic(AVSContext *h) {
|
||||||
MpegEncContext *s = &h->s;
|
MpegEncContext *s = &h->s;
|
||||||
int skip_count = -1;
|
int skip_count = -1;
|
||||||
|
int ret;
|
||||||
enum cavs_mb mb_type;
|
enum cavs_mb mb_type;
|
||||||
|
|
||||||
if (!s->context_initialized) {
|
if (!s->context_initialized) {
|
||||||
@ -963,7 +964,8 @@ static int decode_pic(AVSContext *h) {
|
|||||||
if(h->picture.f.data[0])
|
if(h->picture.f.data[0])
|
||||||
s->avctx->release_buffer(s->avctx, &h->picture.f);
|
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);
|
ff_cavs_init_pic(h);
|
||||||
h->picture.poc = get_bits(&s->gb,8)*2;
|
h->picture.poc = get_bits(&s->gb,8)*2;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user