mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
pulsesink: only notify if all checks passed
Replace goto done: with return, as those are checks when we don't want to flag a pending notify.
This commit is contained in:
parent
b9ddf22340
commit
85ba1b3e6a
1 changed files with 3 additions and 4 deletions
|
@ -315,20 +315,19 @@ gst_pulsering_context_subscribe_cb (pa_context * c,
|
||||||
|
|
||||||
if (t != (PA_SUBSCRIPTION_EVENT_SINK_INPUT | PA_SUBSCRIPTION_EVENT_CHANGE) &&
|
if (t != (PA_SUBSCRIPTION_EVENT_SINK_INPUT | PA_SUBSCRIPTION_EVENT_CHANGE) &&
|
||||||
t != (PA_SUBSCRIPTION_EVENT_SINK_INPUT | PA_SUBSCRIPTION_EVENT_NEW))
|
t != (PA_SUBSCRIPTION_EVENT_SINK_INPUT | PA_SUBSCRIPTION_EVENT_NEW))
|
||||||
goto done;
|
return;
|
||||||
|
|
||||||
if (!pbuf->stream)
|
if (!pbuf->stream)
|
||||||
goto done;
|
return;
|
||||||
|
|
||||||
if (idx != pa_stream_get_index (pbuf->stream))
|
if (idx != pa_stream_get_index (pbuf->stream))
|
||||||
goto done;
|
return;
|
||||||
|
|
||||||
/* Actually this event is also triggered when other properties of
|
/* Actually this event is also triggered when other properties of
|
||||||
* the stream change that are unrelated to the volume. However it is
|
* the stream change that are unrelated to the volume. However it is
|
||||||
* probably cheaper to signal the change here and check for the
|
* probably cheaper to signal the change here and check for the
|
||||||
* volume when the GObject property is read instead of querying it always. */
|
* volume when the GObject property is read instead of querying it always. */
|
||||||
|
|
||||||
done:
|
|
||||||
/* inform streaming thread to notify */
|
/* inform streaming thread to notify */
|
||||||
g_atomic_int_compare_and_exchange (&psink->notify, 0, 1);
|
g_atomic_int_compare_and_exchange (&psink->notify, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue