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:
parent
faf903720a
commit
05cc418ca2
@ -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);
|
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);
|
dur = CMSampleBufferGetDuration (cmbuf);
|
||||||
ts = CMSampleBufferGetPresentationTimeStamp (cmbuf);
|
ts = CMSampleBufferGetPresentationTimeStamp (cmbuf);
|
||||||
if (dur.value != 0) {
|
if (dur.value != 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user