summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Decina <alessandro.d@gmail.com>2014-11-12 16:45:12 +0100
committerSebastian Dröge <sebastian@centricular.com>2014-11-19 17:25:00 +0100
commiteb59f109cf8898dc4b28a75ca42e8d8917ac9bd0 (patch)
treeba643d2581cd5110af34c9f32507844fdca9bb63
parentc3acc296e1ab3d1d74e7168b0e385eb655fd67df (diff)
downloadgstreamer-plugins-bad-eb59f109cf8898dc4b28a75ca42e8d8917ac9bd0.tar.gz
vtenc: fix build on iOS
-rw-r--r--sys/applemedia/vtenc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/applemedia/vtenc.c b/sys/applemedia/vtenc.c
index 3f0ab865d..e52b7c3e7 100644
--- a/sys/applemedia/vtenc.c
+++ b/sys/applemedia/vtenc.c
@@ -447,14 +447,16 @@ static VTCompressionSessionRef
gst_vtenc_create_session (GstVTEnc * self)
{
VTCompressionSessionRef session = NULL;
- CFMutableDictionaryRef encoder_spec, pb_attrs;
+ CFMutableDictionaryRef encoder_spec = NULL, pb_attrs;
OSStatus status;
+#if !HAVE_IOS
encoder_spec =
CFDictionaryCreateMutable (NULL, 0, &kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks);
gst_vtutil_dict_set_boolean (encoder_spec,
kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder, true);
+#endif
pb_attrs = CFDictionaryCreateMutable (NULL, 0, &kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks);
@@ -516,7 +518,8 @@ gst_vtenc_create_session (GstVTEnc * self)
#endif
beach:
- CFRelease (encoder_spec);
+ if (encoder_spec)
+ CFRelease (encoder_spec);
CFRelease (pb_attrs);
return session;