avsamplevideosink: check we are compiling for 10.1 up to 10.4
authorHavard Graff <havard.graff@gmail.com>
Sat, 28 May 2016 19:39:00 +0000 (21:39 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 2 Jun 2016 21:41:54 +0000 (22:41 +0100)
This API was deprecated in 10.4, so don't use it for 10.5 and onwards.

https://bugzilla.gnome.org/show_bug.cgi?id=766973

sys/applemedia/avsamplevideosink.m

index a41ec3b..ce17e98 100644 (file)
@@ -748,7 +748,10 @@ gst_av_sample_video_sink_show_frame (GstVideoSink * vsink, GstBuffer * buf)
     _request_data (av_sink);
   g_mutex_unlock (&av_sink->render_lock);
 
-#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1010
+#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && \
+    MAC_OS_X_VERSION_MAX_ALLOWED >= 1010 && \
+    defined(MAC_OS_X_VERSION_MIN_REQUIRED) && \
+    MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4
   if ([av_sink->layer status] == AVQueuedSampleBufferRenderingStatusFailed) {
     GST_ERROR_OBJECT (av_sink, "failed to enqueue buffer on layer, %s",
         [[[av_sink->layer error] description] UTF8String]);