video: share hwdec extra surface count between backends

It's a quite important and fragile magic number.
This commit is contained in:
wm4 2017-01-11 15:55:45 +01:00
parent fee5ceccad
commit 5f449fc11f
3 changed files with 9 additions and 2 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;