avfassetsrc: fix huge memory leak

CMSampleBuffers were retained -> huge memory leak.

https://bugzilla.gnome.org/show_bug.cgi?id=750638
This commit is contained in:
Ilya Konstantinov 2015-05-12 00:18:02 +02:00 committed by Sebastian Dröge
parent faf903720a
commit 05cc418ca2

View file

@ -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) {