[vlc-commits] ci_filters: simplify weak symbols handling

Thomas Guillem git at videolan.org
Wed Oct 11 11:58:25 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Oct 10 18:28:58 2017 +0200| [d139d48a55fdf1d1a59d354d354f552a589efa25] | committer: Thomas Guillem

ci_filters: simplify weak symbols handling

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d139d48a55fdf1d1a59d354d354f552a589efa25
---

 modules/video_filter/ci_filters.m | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/modules/video_filter/ci_filters.m b/modules/video_filter/ci_filters.m
index 798a0b2561..0bc401819c 100644
--- a/modules/video_filter/ci_filters.m
+++ b/modules/video_filter/ci_filters.m
@@ -595,16 +595,6 @@ error:
     return VLC_EGENERIC;
 }
 
-#if MAC_OS_X_VERSION_MIN_ALLOWED <= MAC_OS_X_VERSION_10_11
-const CFStringRef kCGColorSpaceITUR_709 = CFSTR("kCGColorSpaceITUR_709");
-#endif
-
-#if TARGET_OS_IPHONE
-# define CI_HANDLE_COLORSPACES (NSFoundationVersionNumber >= 1240)
-#else
-# define CI_HANDLE_COLORSPACES (NSFoundationVersionNumber >= 1252)
-#endif
-
 static int
 Open(vlc_object_t *obj, char const *psz_filter)
 {
@@ -616,7 +606,10 @@ Open(vlc_object_t *obj, char const *psz_filter)
         case VLC_CODEC_CVPX_UYVY:
         case VLC_CODEC_CVPX_I420:
         case VLC_CODEC_CVPX_BGRA:
-            if (!CI_HANDLE_COLORSPACES)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wpartial-availability"
+            if (&kCGColorSpaceITUR_709 == nil)
+#pragma clang diagnostic pop
             {
                 msg_Warn(obj, "iOS/macOS version is too old, aborting...");
                 return VLC_EGENERIC;



More information about the vlc-commits mailing list