[Bug 752651] decodebin: segfault on setting to NULL

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Aug 21 05:45:12 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=752651

--- Comment #24 from Vincent Penquerc'h <vincent.penquerch at collabora.co.uk> ---
Ha ha, prudent course of action :D
There may be other places that could benefit from similar changes, but I'm
scared to touch other places tbh.

AFAICT, the issue here is that another thread is switching state downwards
while the streaming thread is advertising a newly found pad after a very recent
upwards state change. The downwards state change causes the pad to become
deactivated between the moment it was activated and pad-added called. and the
moment where the pad-added callback is done autoplugging. So by taking the
stream lock, we ensure the pad can't be deactivated till we're done, as well as
catch the case where it got deactivated just before we got the stream lock.

After the pad gets deactivated, I expect all manners of free/deinit code to be
run, which explains the odd "corrupted" like crashes. I did not try to take a
ref to the pad for the duration of pad-added, but I wouldn't expect that to
work, since there must be a ref at that point, held by the caller (or even the
deactivated check would bomb).

Anyway, latest gst-validate is running now.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list