aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorTong Wu <tong1.wu-at-intel.com@ffmpeg.org>2023-12-28 11:10:38 +0800
committerHaihao Xiang <haihao.xiang@intel.com>2024-01-05 11:06:57 +0800
commitd18ed2ddb59b0fad4ab07431c2967db0f2d79b2d (patch)
treeafa0e076a2844825a63a2e9547a92982f01888ec /libavcodec
parent8b76bae8961c3045fa73aa2da47345c70a93d599 (diff)
downloadffmpeg-d18ed2ddb59b0fad4ab07431c2967db0f2d79b2d.tar.gz
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>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/d3d12va_vp9.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/d3d12va_vp9.c b/libavcodec/d3d12va_vp9.c
index bb94e18781..d6dfc905d9 100644
--- a/libavcodec/d3d12va_vp9.c
+++ b/libavcodec/d3d12va_vp9.c
@@ -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);
}