Pulsesink: “Disconnected: Bad state” error printed when play an audio with varying number of channels
When play audio with varying number of channels, error like "Disconnected: Bad state" always appears when the number of channels changes. The issue is caused by stream check in function gst_pulsesink_get_sink_input_info () in pulsesink.c. Is it necessary to check the state of pbuf->stream in function gst_pulsesink_get_sink_input_info ()?
If we don't check the state of stream in function gst_pulsesink_get_sink_input_info () in pulsesink.c like below by change TRUE to FALSE, then the audio can play normally. The attachment is the tested audio with varying number of channels.
while (pa_operation_get_state (o) == PA_OPERATION_RUNNING) { pa_threaded_mainloop_wait (mainloop); if (gst_pulsering_is_dead (psink, pbuf, FALSE)) goto unlock; }