1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

vp56: Check av_frame_ref() return code

Fixes CID991837

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-03-19 15:22:56 +01:00
parent 5f476cfe6e
commit feeb8ca56d

View File

@ -502,6 +502,7 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
int remaining_buf_size = avpkt->size;
int av_uninit(alpha_offset);
int i, res;
int ret;
if (s->has_alpha) {
if (remaining_buf_size < 3)
@ -529,7 +530,10 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
if (s->has_alpha) {
av_frame_unref(s->alpha_context->frames[VP56_FRAME_CURRENT]);
av_frame_ref(s->alpha_context->frames[VP56_FRAME_CURRENT], p);
if ((ret = av_frame_ref(s->alpha_context->frames[VP56_FRAME_CURRENT], p)) < 0) {
av_frame_unref(p);
return ret;
}
}
if (res == VP56_SIZE_CHANGE) {