[FFmpeg-cvslog] avcodec/d3d12va_vp9: fix vp9 max_num_refs value
Tong Wu
git at videolan.org
Fri Jan 5 05:53:38 EET 2024
ffmpeg | branch: master | Tong Wu <tong1.wu-at-intel.com at ffmpeg.org> | Thu Dec 28 11:10:38 2023 +0800| [d18ed2ddb59b0fad4ab07431c2967db0f2d79b2d] | committer: Haihao Xiang
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 at intel.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d18ed2ddb59b0fad4ab07431c2967db0f2d79b2d
---
libavcodec/d3d12va_vp9.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
}
More information about the ffmpeg-cvslog
mailing list