---
libavcodec/dxva2.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/dxva2.c b/libavcodec/dxva2.c
index e34409d44..edc8ade96 100644
--- a/libavcodec/dxva2.c
+++ b/libavcodec/dxva2.c
@@ -608,6 +608,9 @@ int ff_dxva2_common_frame_params(AVCodecContext *avctx,
else
num_surfaces += 2;
+ if (avctx->extra_hw_frames > 0)
+ num_surfaces += avctx->extra_hw_frames;
+
/* add extra surfaces for frame threading */
if (avctx->active_thread_type & FF_THREAD_FRAME)
num_surfaces += avctx->thread_count;
--
2.11.0
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel