avcodec/d3d12va_vp9: fix vp9 max_num_refs value

Previous max_num_refs was based on pp.frame_refs plus 1 and it could possibly
reaches the size limit. Actually it should be the size of pp.ref_frame_map
plus 1.

Signed-off-by: Tong Wu <tong1.wu@intel.com>
This commit is contained in:
Tong Wu 2023-12-28 11:10:38 +08:00 committed by Haihao Xiang
parent 8b76bae896
commit d18ed2ddb5
1 changed files with 1 additions and 1 deletions

View File

@ -148,7 +148,7 @@ static int d3d12va_vp9_decode_init(AVCodecContext *avctx)
break;
};
ctx->max_num_ref = FF_ARRAY_ELEMS(pp.frame_refs) + 1;
ctx->max_num_ref = FF_ARRAY_ELEMS(pp.ref_frame_map) + 1;
return ff_d3d12va_decode_init(avctx);
}