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.
Unified · Split
| @@ -148,7 +148,7 @@ static int d3d12va_vp9_decode_init(AVCodecContext *avctx) · 147 unmodified lines | |||
| 148 | break; | 148 | break; |
| 149 | }; | 149 | }; |
| 150 | 150 | ||
| 151 | ctx->max_num_ref = FF_ARRAY_ELEMS(pp.frame_refs) + 1; | 151 | ctx->max_num_ref = FF_ARRAY_ELEMS(pp.ref_frame_map) + 1; |
| 152 | 152 | ||
| 153 | return ff_d3d12va_decode_init(avctx); | 153 | return ff_d3d12va_decode_init(avctx); |
| 154 | } | 154 | } |