vtenc: fix build on iOS

This commit is contained in:
Alessandro Decina 2014-11-12 16:45:12 +01:00
parent ad00f4a0e2
commit 5977ef5552

View file

@ -527,14 +527,16 @@ static VTCompressionSessionRef
gst_vtenc_create_session (GstVTEnc * self) gst_vtenc_create_session (GstVTEnc * self)
{ {
VTCompressionSessionRef session = NULL; VTCompressionSessionRef session = NULL;
CFMutableDictionaryRef encoder_spec, pb_attrs; CFMutableDictionaryRef encoder_spec = NULL, pb_attrs;
OSStatus status; OSStatus status;
#if !HAVE_IOS
encoder_spec = encoder_spec =
CFDictionaryCreateMutable (NULL, 0, &kCFTypeDictionaryKeyCallBacks, CFDictionaryCreateMutable (NULL, 0, &kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks); &kCFTypeDictionaryValueCallBacks);
gst_vtutil_dict_set_boolean (encoder_spec, gst_vtutil_dict_set_boolean (encoder_spec,
kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder, true); kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder, true);
#endif
pb_attrs = CFDictionaryCreateMutable (NULL, 0, &kCFTypeDictionaryKeyCallBacks, pb_attrs = CFDictionaryCreateMutable (NULL, 0, &kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks); &kCFTypeDictionaryValueCallBacks);
@ -600,7 +602,8 @@ gst_vtenc_create_session (GstVTEnc * self)
#endif #endif
beach: beach:
CFRelease (encoder_spec); if (encoder_spec)
CFRelease (encoder_spec);
CFRelease (pb_attrs); CFRelease (pb_attrs);
return session; return session;