From c02f6032626aebfa8359cbed60b60ee5324760e9 Mon Sep 17 00:00:00 2001 From: Haihao Xiang Date: Wed, 12 Feb 2020 11:23:18 +0800 Subject: [PATCH] msdk: meson: check whether mfxExtVP9Param is defined User reported MFX_VERSION is 1026 however the build is broken[1], so add the check for mfxExtVP9Param to make sure it can be build without compiler error. In addtion, it fixes a stupid typo (#endif') introduced by me. [1] https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/988#note_408093 --- sys/msdk/meson.build | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/msdk/meson.build b/sys/msdk/meson.build index de02e03f10..33596c9fbd 100644 --- a/sys/msdk/meson.build +++ b/sys/msdk/meson.build @@ -77,12 +77,16 @@ if cxx.has_header('mfxvp9.h', args: '-I' + mfx_incdir) cdata.set10('USE_MSDK_VP9_DEC', 1) endif -# mfx 1.26+ is required to support raw VP9 stream +# Usually MFX_VERSION 1026+ is required to support raw VP9 stream, however Fedora 30 has MFX_VERSION==1026 +# but without support for raw VP9 stream, so mfxExtVP9Param is checked as well. +# See https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/988#note_408093 mfx_ver126_check_code = ''' #include +#include #if MFX_VERSION < 1026 #error "The current version of mfx doesn't support raw vp9 stream" -#endif' +#endif +mfxExtVP9Param ext; ''' have_mfx_ver126 = cc.compiles(mfx_ver126_check_code,