diff --git a/sys/applemedia/Makefile.am b/sys/applemedia/Makefile.am index 36f3b9e242..746744245d 100644 --- a/sys/applemedia/Makefile.am +++ b/sys/applemedia/Makefile.am @@ -96,5 +96,5 @@ libgstapplemedia_la_SOURCES += \ vtenc.c \ vtdec.c -libgstapplemedia_la_LDFLAGS += -Wl,-framework -Wl,VideoToolbox +libgstapplemedia_la_LDFLAGS += -Wl,-weak_framework -Wl,VideoToolbox endif diff --git a/sys/applemedia/plugin.m b/sys/applemedia/plugin.m index e85f67a6aa..b9d82b3a76 100644 --- a/sys/applemedia/plugin.m +++ b/sys/applemedia/plugin.m @@ -90,8 +90,11 @@ plugin_init (GstPlugin * plugin) res &= gst_element_register (plugin, "atdec", GST_RANK_MARGINAL, GST_TYPE_ATDEC); #ifdef HAVE_VIDEOTOOLBOX - res &= gst_element_register (plugin, "vtdec", GST_RANK_PRIMARY, GST_TYPE_VTDEC); - gst_vtenc_register_elements (plugin); + /* Check if the framework actually exists at runtime */ + if (VTCompressionSessionCreate != NULL) { + res &= gst_element_register (plugin, "vtdec", GST_RANK_PRIMARY, GST_TYPE_VTDEC); + gst_vtenc_register_elements (plugin); + } #endif return res;