mirror of https://git.ffmpeg.org/ffmpeg.git
hwcontext_vaapi: Fix compilation with libva versions < 1.4.0
The BufferHandle API was added in libva 1.4.0 / VAAPI 0.36.0.
This commit is contained in:
parent
b473e76876
commit
92a0a6bea9
|
@ -1164,6 +1164,7 @@ fail:
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if VA_CHECK_VERSION(0, 36, 0)
|
||||||
typedef struct VAAPIDRMImageBufferMapping {
|
typedef struct VAAPIDRMImageBufferMapping {
|
||||||
VAImage image;
|
VAImage image;
|
||||||
VABufferInfo buffer_info;
|
VABufferInfo buffer_info;
|
||||||
|
@ -1323,6 +1324,7 @@ fail:
|
||||||
av_freep(&mapping);
|
av_freep(&mapping);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int vaapi_map_to_drm(AVHWFramesContext *hwfc, AVFrame *dst,
|
static int vaapi_map_to_drm(AVHWFramesContext *hwfc, AVFrame *dst,
|
||||||
const AVFrame *src, int flags)
|
const AVFrame *src, int flags)
|
||||||
|
@ -1333,7 +1335,10 @@ static int vaapi_map_to_drm(AVHWFramesContext *hwfc, AVFrame *dst,
|
||||||
if (err != AVERROR(ENOSYS))
|
if (err != AVERROR(ENOSYS))
|
||||||
return err;
|
return err;
|
||||||
#endif
|
#endif
|
||||||
|
#if VA_CHECK_VERSION(0, 36, 0)
|
||||||
return vaapi_map_to_drm_abh(hwfc, dst, src, flags);
|
return vaapi_map_to_drm_abh(hwfc, dst, src, flags);
|
||||||
|
#endif
|
||||||
|
return AVERROR(ENOSYS);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_LIBDRM */
|
#endif /* CONFIG_LIBDRM */
|
||||||
|
|
Loading…
Reference in New Issue