aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2018-04-27 13:41:56 +0100
committerMark Thompson <sw@jkqxz.net>2018-04-27 23:29:51 +0100
commit92a0a6bea9dc3087fa8d232b750db1dd0d70b157 (patch)
tree1467fa8beaf5228199bcc01815694d3934934170
parentb473e76876d9008dfbedf00b35a471e71b41f3b8 (diff)
downloadffmpeg-92a0a6bea9dc3087fa8d232b750db1dd0d70b157.tar.gz
hwcontext_vaapi: Fix compilation with libva versions < 1.4.0
The BufferHandle API was added in libva 1.4.0 / VAAPI 0.36.0.
-rw-r--r--libavutil/hwcontext_vaapi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
index 53a5b02822..7daaa951cc 100644
--- a/libavutil/hwcontext_vaapi.c
+++ b/libavutil/hwcontext_vaapi.c
@@ -1164,6 +1164,7 @@ fail:
}
#endif
+#if VA_CHECK_VERSION(0, 36, 0)
typedef struct VAAPIDRMImageBufferMapping {
VAImage image;
VABufferInfo buffer_info;
@@ -1323,6 +1324,7 @@ fail:
av_freep(&mapping);
return err;
}
+#endif
static int vaapi_map_to_drm(AVHWFramesContext *hwfc, AVFrame *dst,
const AVFrame *src, int flags)
@@ -1333,7 +1335,10 @@ static int vaapi_map_to_drm(AVHWFramesContext *hwfc, AVFrame *dst,
if (err != AVERROR(ENOSYS))
return err;
#endif
+#if VA_CHECK_VERSION(0, 36, 0)
return vaapi_map_to_drm_abh(hwfc, dst, src, flags);
+#endif
+ return AVERROR(ENOSYS);
}
#endif /* CONFIG_LIBDRM */