mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
pulsesink: Convert an erroneous assertion
Occasionally, we get a change callback for an old stream, triggering the assertion unnecessarily. Just ignore such callbacks.
This commit is contained in:
parent
ca25de8f77
commit
cf584105c6
1 changed files with 5 additions and 3 deletions
|
@ -1516,9 +1516,11 @@ gst_pulsesink_sink_input_info_cb (pa_context * c, const pa_sink_input_info * i,
|
|||
if (!pbuf->stream)
|
||||
goto done;
|
||||
|
||||
g_assert (i->index == pa_stream_get_index (pbuf->stream));
|
||||
|
||||
psink->volume = pa_sw_volume_to_linear (pa_cvolume_max (&i->volume));
|
||||
/* If the index doesn't match our current stream,
|
||||
* it implies we just recreated the stream (caps change)
|
||||
*/
|
||||
if (i->index == pa_stream_get_index (pbuf->stream))
|
||||
psink->volume = pa_sw_volume_to_linear (pa_cvolume_max (&i->volume));
|
||||
|
||||
done:
|
||||
pa_threaded_mainloop_signal (psink->mainloop, 0);
|
||||
|
|
Loading…
Reference in a new issue