diff --git a/sys/applemedia/atdec.c b/sys/applemedia/atdec.c index 0fe8df013e..8026850c83 100644 --- a/sys/applemedia/atdec.c +++ b/sys/applemedia/atdec.c @@ -225,22 +225,27 @@ gst_caps_to_at_format (GstCaps * caps, AudioStreamBasicDescription * format) format->mFormatID = kAudioFormatMPEG4AAC; format->mFramesPerPacket = 1024; } else if (can_intersect_static_caps (caps, &mp3_caps)) { - gint layer; + gint layer, mpegaudioversion = 1; gst_structure_get_int (structure, "layer", &layer); + gst_structure_get_int (structure, "mpegaudioversion", &mpegaudioversion); switch (layer) { case 1: format->mFormatID = kAudioFormatMPEGLayer1; + format->mFramesPerPacket = 384; break; case 2: format->mFormatID = kAudioFormatMPEGLayer2; + format->mFramesPerPacket = 1152; break; case 3: format->mFormatID = kAudioFormatMPEGLayer3; + format->mFramesPerPacket = (mpegaudioversion == 1 ? 1152 : 576); break; default: g_warn_if_reached (); format->mFormatID = kAudioFormatMPEGLayer3; + format->mFramesPerPacket = 1152; break; } } else if (can_intersect_static_caps (caps, &raw_caps)) { diff --git a/sys/applemedia/coremediabuffer.c b/sys/applemedia/coremediabuffer.c index 56c38bc9e7..5bf9a3ecff 100644 --- a/sys/applemedia/coremediabuffer.c +++ b/sys/applemedia/coremediabuffer.c @@ -25,7 +25,7 @@ gst_core_media_meta_free (GstCoreMediaMeta * meta, GstBuffer * buf) if (meta->image_buf != NULL) { CVPixelBufferUnlockBaseAddress (meta->image_buf, kCVPixelBufferLock_ReadOnly); - CVBufferRelease(meta->image_buf); + CVBufferRelease (meta->image_buf); } if (meta->block_buf != NULL) { CFRelease (meta->block_buf); diff --git a/sys/applemedia/vtutil.c b/sys/applemedia/vtutil.c index 40274c25bc..6c4441580e 100644 --- a/sys/applemedia/vtutil.c +++ b/sys/applemedia/vtutil.c @@ -75,7 +75,7 @@ void gst_vtutil_dict_set_boolean (CFMutableDictionaryRef dict, CFStringRef key, gboolean value) { - CFDictionarySetValue (dict, key, value ? kCFBooleanTrue: kCFBooleanFalse); + CFDictionarySetValue (dict, key, value ? kCFBooleanTrue : kCFBooleanFalse); } void @@ -91,7 +91,7 @@ gst_vtutil_dict_set_data (CFMutableDictionaryRef dict, CFStringRef key, void gst_vtutil_dict_set_object (CFMutableDictionaryRef dict, CFStringRef key, - CFTypeRef *value) + CFTypeRef * value) { CFDictionarySetValue (dict, key, value); CFRelease (value);