GNOME Bugzilla – Bug 753081
applemedia/avsample: Cleanup of CA layer is racy and crashes occasionally
Last modified: 2015-08-16 13:38:46 UTC
Created attachment 308498 [details] [review] applemedia/avsample: Fix racy cleanup of CA layer The block that is dispatched async to the main thread assumed the wrapping GstAvSampleVideoSink to be alive. However, at the time of the block execution the GstObject instance that is deferenced to access the CA layer might already be freed, which caused occasional crashes. Instead, we now only pass the CoreAnimation layer that needs to be released to the block. We use __block to make sure the block is not increasing the refcount of the CA layer again on its own. patch for above fix is attached
Thanks! commit 0cc6d16c94d0e5ab09167b3a8d03ed0531c8f795 Author: Heinrich Fink <hfink@toolsonair.com> Date: Thu Jul 30 23:31:21 2015 +0200 applemedia/avsample: Fix racy cleanup of CA layer The block that is dispatched async to the main thread assumed the wrapping GstAvSampleVideoSink to be alive. However, at the time of the block execution the GstObject instance that is deferenced to access the CA layer might already be freed, which caused occasional crashes. Instead, we now only pass the CoreAnimation layer that needs to be released to the block. We use __block to make sure the block is not increasing the refcount of the CA layer again on its own. https://bugzilla.gnome.org/show_bug.cgi?id=753081