mirror of https://github.com/mpv-player/mpv
video: share hwdec extra surface count between backends
It's a quite important and fragile magic number.
This commit is contained in:
parent
fee5ceccad
commit
5f449fc11f
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
#include "d3d.h"
|
#include "d3d.h"
|
||||||
|
|
||||||
#define ADDITIONAL_SURFACES (4 + HWDEC_DELAY_QUEUE_COUNT)
|
#define ADDITIONAL_SURFACES (HWDEC_EXTRA_SURFACES + HWDEC_DELAY_QUEUE_COUNT)
|
||||||
|
|
||||||
struct d3d11va_decoder {
|
struct d3d11va_decoder {
|
||||||
ID3D11VideoDecoder *decoder;
|
ID3D11VideoDecoder *decoder;
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
#include "d3d.h"
|
#include "d3d.h"
|
||||||
|
|
||||||
#define ADDITIONAL_SURFACES (4 + HWDEC_DELAY_QUEUE_COUNT)
|
#define ADDITIONAL_SURFACES (HWDEC_EXTRA_SURFACES + HWDEC_DELAY_QUEUE_COUNT)
|
||||||
|
|
||||||
struct priv {
|
struct priv {
|
||||||
struct mp_log *log;
|
struct mp_log *log;
|
||||||
|
|
|
@ -11,6 +11,13 @@
|
||||||
|
|
||||||
#define HWDEC_DELAY_QUEUE_COUNT 2
|
#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 {
|
typedef struct lavc_ctx {
|
||||||
struct mp_log *log;
|
struct mp_log *log;
|
||||||
struct MPOpts *opts;
|
struct MPOpts *opts;
|
||||||
|
|
Loading…
Reference in New Issue