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)
{
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);
@ -600,6 +602,7 @@ gst_vtenc_create_session (GstVTEnc * self)
#endif
beach:
if (encoder_spec)
CFRelease (encoder_spec);
CFRelease (pb_attrs);