diff options
Diffstat (limited to 'video/decode/dxva2.c')
-rw-r--r-- | video/decode/dxva2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/video/decode/dxva2.c b/video/decode/dxva2.c index 2dfbae3dd3..0400b74bab 100644 --- a/video/decode/dxva2.c +++ b/video/decode/dxva2.c @@ -39,6 +39,8 @@ #include "video/hwdec.h" #include "video/d3d.h" +#define ADDTIONAL_SURFACES HWDEC_DELAY_QUEUE_COUNT + // A minor evil. #ifndef FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO #define FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO 2 @@ -574,7 +576,7 @@ static int dxva2_create_decoder(struct lavc_ctx *s, int w, int h, surface_alignment = 16; /* 4 base work surfaces */ - ctx->num_surfaces = 4; + ctx->num_surfaces = 4 + ADDTIONAL_SURFACES; /* add surfaces based on number of possible refs */ if (codec_id == AV_CODEC_ID_H264 || codec_id == AV_CODEC_ID_HEVC) |