Pulsesink was recently changed to defer uncorking until there is data
to write. This condition will however never occur when EOS in being
rendered (since that marks the end of data). Changing to PAUSED state
while EOS is being waited on results in a hang: pausing corks the
stream, which will never be undone since there is no more data when
going back to PLAYING. If pulsesink is the clock provider, deadlock
ensues since time doesn't continue in corked state and the clock id
for EOS wait never fires.
Fixes #645961.
GST_DEBUG_OBJECT (psink, "starting");
pbuf->paused = FALSE;
+
+ /* EOS needs running clock */
+ if (GST_BASE_SINK_CAST (psink)->eos ||
+ g_atomic_int_get (&GST_BASE_AUDIO_SINK (psink)->abidata.
+ ABI.eos_rendering))
+ gst_pulsering_set_corked (pbuf, FALSE, FALSE);
+
pa_threaded_mainloop_unlock (mainloop);
return TRUE;