decodebin: Protect ->source with the object lock
authorThibault Saunier <tsaunier@igalia.com>
Mon, 25 Mar 2019 22:11:54 +0000 (19:11 -0300)
committerThibault Saunier <tsaunier@gnome.org>
Tue, 9 Apr 2019 17:20:01 +0000 (17:20 +0000)
commit9e004b56fe36ec08e77ca3dbb07effac1074e952
treeb56fb67bab35e5a781cee89c4ddce4c5e3665a99
parente397c4cea10938c6699283179a6611098e4af089
decodebin: Protect ->source with the object lock

As expected by the property getter.

Basically there are cases where we can be getting the source from
any thread and in another thread bring back the element from PAUSED
to READY, which leads to a critical warning (or worse).

The only place where we use `->source` outside the property getter is
the change_state function so the current way of setting/reading it
should be safe.
gst/playback/gsturidecodebin.c