GNOME Bugzilla – Bug 564929
Audiosink blocks if setcaps called while playing
Last modified: 2008-12-20 12:44:50 UTC
If the format changes while an audiosink is playing, a deadlock occurs. To reproduce, use the playbin2 gapless test program: gst/playback/test7 with two files of differing sample rates. When it gets to the 2nd file, it deadlocks - gstaudiosink.c:425 is trying to join the audiosink thread, but the ringbuffer is still running and will never shut down.
* gst-libs/gst/audio/gstbaseaudiosink.c: (gst_base_audio_sink_setcaps): Pause the write thread before deactivating and releasing the ringbuffer to avoid a deadlock when we do gapless playback with different sample rates in playbin2. Fixes #564929.