diff --git a/sys/applemedia/avfassetsrc.m b/sys/applemedia/avfassetsrc.m index 0a40c0dbcc..0aaf3adcfe 100644 --- a/sys/applemedia/avfassetsrc.m +++ b/sys/applemedia/avfassetsrc.m @@ -1084,6 +1084,10 @@ gst_avf_asset_src_uri_handler_init (gpointer g_iface, gpointer iface_data) } buf = gst_core_media_buffer_new (cmbuf, FALSE, TRUE); + CFRelease (cmbuf); + if (buf == NULL) + return NULL; + /* cmbuf is now retained by buf (in meta) */ dur = CMSampleBufferGetDuration (cmbuf); ts = CMSampleBufferGetPresentationTimeStamp (cmbuf); if (dur.value != 0) {