---
libavcodec/vaapi_decode.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
index 0db79d401..92becdd88 100644
--- a/libavcodec/vaapi_decode.c
+++ b/libavcodec/vaapi_decode.c
@@ -567,7 +567,8 @@ int ff_vaapi_decode_init(AVCodecContext *avctx)
ctx->frames->height = avctx->coded_height;
ctx->frames->sw_format = ctx->surface_format;
- ctx->frames->initial_pool_size = ctx->surface_count;
+ ctx->frames->initial_pool_size = ctx->surface_count +
+ avctx->extra_hw_frames;
err = av_hwframe_ctx_init(avctx->hw_frames_ctx);
if (err < 0) {
--
2.11.0
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel