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:
Jimmy Ohn 2015-02-13 19:43:16 +09:00 committed by Tim-Philipp Müller
parent 3f5b690e78
commit f9a8f0ebfe

View file

@ -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:
{