fakesink: hack around crasher bug in g_object_notify() for out-of-band events
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Sat, 30 May 2009 19:36:25 +0000 (20:36 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 31 May 2009 18:17:33 +0000 (19:17 +0100)
commit7e4b164c125926784805446482151e4e7bfffe96
tree7b1425949320e7a3e59499975dc98f505180c64d
parent7c4e618471eb4218785d5891da46b67de952397e
fakesink: hack around crasher bug in g_object_notify() for out-of-band events

GObject may crash if two threads do concurrent g_object_notify() on the same
object. This may happen if fakesink receives an out-of-band event such as
FLUSH_START while processing a buffer or serialised event in the streaming
thread. Since this may happen with the default settings during a common
operation like a seek, and there seems to be little chance of a timely fix
in GObject (see #166020), we should hack around this issue by protecting all
of fakesink's direct g_object_notify() calls with a lock.

Also add unit test for the above.

Fixes #554460.
plugins/elements/gstfakesink.c
plugins/elements/gstfakesink.h
tests/check/Makefile.am
tests/check/elements/fakesink.c