aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJun Zhao <jun.zhao@intel.com>2017-09-13 20:21:38 -0400
committerMark Thompson <sw@jkqxz.net>2017-09-14 22:42:51 +0100
commit197d298ab3b27d1ec2ee7bf568debca105881a54 (patch)
treea3a47acf15c8ee2a31127c4431c5b1bd166a0e99
parent462568185b0af4d651441ae397cc83bdb7e573ed (diff)
downloadffmpeg-197d298ab3b27d1ec2ee7bf568debca105881a54.tar.gz
hwcontext_vaapi: Fix build failure with old libdrm
Signed-off-by: Jun Zhao <jun.zhao@intel.com> Signed-off-by: Mark Thompson <sw@jkqxz.net>
-rw-r--r--libavutil/hwcontext_vaapi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
index 2cc6f26715..852f0abda2 100644
--- a/libavutil/hwcontext_vaapi.c
+++ b/libavutil/hwcontext_vaapi.c
@@ -918,9 +918,11 @@ static const struct {
int nb_layer_formats;
uint32_t layer_formats[AV_DRM_MAX_PLANES];
} vaapi_drm_format_map[] = {
+#ifdef DRM_FORMAT_R8
DRM_MAP(NV12, 2, DRM_FORMAT_R8, DRM_FORMAT_RG88),
+#endif
DRM_MAP(NV12, 1, DRM_FORMAT_NV12),
-#ifdef VA_FOURCC_P010
+#if defined(VA_FOURCC_P010) && defined(DRM_FORMAT_R16)
DRM_MAP(P010, 2, DRM_FORMAT_R16, DRM_FORMAT_RG1616),
#endif
DRM_MAP(BGRA, 1, DRM_FORMAT_BGRA8888),