diff options
Diffstat (limited to 'video')
-rw-r--r-- | video/decode/d3d11va.c | 2 | ||||
-rw-r--r-- | video/decode/dxva2.c | 2 | ||||
-rw-r--r-- | video/decode/lavc.h | 7 |
3 files changed, 9 insertions, 2 deletions
diff --git a/video/decode/d3d11va.c b/video/decode/d3d11va.c index e31582d37c..a69a3890bd 100644 --- a/video/decode/d3d11va.c +++ b/video/decode/d3d11va.c @@ -27,7 +27,7 @@ #include "d3d.h" -#define ADDITIONAL_SURFACES (4 + HWDEC_DELAY_QUEUE_COUNT) +#define ADDITIONAL_SURFACES (HWDEC_EXTRA_SURFACES + HWDEC_DELAY_QUEUE_COUNT) struct d3d11va_decoder { ID3D11VideoDecoder *decoder; diff --git a/video/decode/dxva2.c b/video/decode/dxva2.c index ab91c186df..c6a34a2e70 100644 --- a/video/decode/dxva2.c +++ b/video/decode/dxva2.c @@ -32,7 +32,7 @@ #include "d3d.h" -#define ADDITIONAL_SURFACES (4 + HWDEC_DELAY_QUEUE_COUNT) +#define ADDITIONAL_SURFACES (HWDEC_EXTRA_SURFACES + HWDEC_DELAY_QUEUE_COUNT) struct priv { struct mp_log *log; diff --git a/video/decode/lavc.h b/video/decode/lavc.h index a28aa0385b..c39a06b624 100644 --- a/video/decode/lavc.h +++ b/video/decode/lavc.h @@ -11,6 +11,13 @@ #define HWDEC_DELAY_QUEUE_COUNT 2 +// Maximum number of surfaces the player wants to buffer. +// This number might require adjustment depending on whatever the player does; +// for example, if vo_opengl increases the number of reference surfaces for +// interpolation, this value has to be increased too. +// This value does not yet include HWDEC_DELAY_QUEUE_COUNT. +#define HWDEC_EXTRA_SURFACES 4 + typedef struct lavc_ctx { struct mp_log *log; struct MPOpts *opts; |