summaryrefslogtreecommitdiffstats
path: root/video/decode/vaapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/decode/vaapi.c')
-rw-r--r--video/decode/vaapi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/video/decode/vaapi.c b/video/decode/vaapi.c
index edc95f5a29..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
+#define ADDTIONAL_SURFACES MPMAX(6, HWDEC_DELAY_QUEUE_COUNT)
// Some upper bound.
#define MAX_SURFACES 25
@@ -109,7 +109,7 @@ static const struct va_native_display disp_x11 = {
#endif
#define HAS_HEVC VA_CHECK_VERSION(0, 38, 0)
-#define HAS_VP9 VA_CHECK_VERSION(0, 38, 1)
+#define HAS_VP9 (VA_CHECK_VERSION(0, 38, 1) && defined(FF_PROFILE_VP9_0))
#define PE(av_codec_id, ff_profile, vdp_profile) \
{AV_CODEC_ID_ ## av_codec_id, FF_PROFILE_ ## ff_profile, \