mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
pulsesink: Enhance code readability in pulsesink_query
In pulsesink_query function, we use a switch for the query type. In the CAPS case, there is no 'break', instead we return right away. Use a break and return at the end of the function instead for better code readability. https://bugzilla.gnome.org/show_bug.cgi?id=744461
This commit is contained in:
parent
3f5b690e78
commit
f9a8f0ebfe
1 changed files with 3 additions and 4 deletions
|
@ -3174,7 +3174,7 @@ static gboolean
|
|||
gst_pulsesink_query (GstBaseSink * sink, GstQuery * query)
|
||||
{
|
||||
GstPulseSink *pulsesink = GST_PULSESINK_CAST (sink);
|
||||
gboolean ret;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
switch (GST_QUERY_TYPE (query)) {
|
||||
case GST_QUERY_CAPS:
|
||||
|
@ -3187,10 +3187,9 @@ gst_pulsesink_query (GstBaseSink * sink, GstQuery * query)
|
|||
if (caps) {
|
||||
gst_query_set_caps_result (query, caps);
|
||||
gst_caps_unref (caps);
|
||||
return TRUE;
|
||||
} else {
|
||||
return FALSE;
|
||||
ret = TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case GST_QUERY_ACCEPT_CAPS:
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue