diff --git a/video/decode/vaapi.c b/video/decode/vaapi.c index 4b8987cf24..d7aa2694aa 100644 --- a/video/decode/vaapi.c +++ b/video/decode/vaapi.c @@ -44,7 +44,7 @@ * Note that redundant additional surfaces also might allow for some * buffering (i.e. not trying to reuse a surface while it's busy). */ -#define ADDTIONAL_SURFACES (6 + HWDEC_DELAY_QUEUE_COUNT) +#define ADDTIONAL_SURFACES MPMAX(6, HWDEC_DELAY_QUEUE_COUNT) // Some upper bound. #define MAX_SURFACES 25