Skip to content

pad: Keep IDLE probe hook alive during immediate callback

Jan Alexander Steffens requested to merge heftig/gstreamer:idle-hook-ref into master

When the probe returns GST_PAD_PROBE_REMOVE and gets called concurrently from the streaming thread while we're in the callback here, the hook has already been destroyed by the time we've reacquired the object lock. Consequently, cleanup_hook gets passed an invalid pointer.

Keep another reference to the hook alive to avoid this situation.

Merge request reports