diff options
author | Jimmy Ohn <yongjin.ohn@lge.com> | 2015-02-13 19:43:16 +0900 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2015-02-13 22:27:49 +0000 |
commit | f9a8f0ebfea028e894b51de4215e27cebd784b09 (patch) | |
tree | 00203b8fc4813860254089a23f250aaf53b17c78 /ext/pulse | |
parent | 3f5b690e782ea8db44ca89198910909d5076dd95 (diff) | |
download | gstreamer-plugins-good-f9a8f0ebfea028e894b51de4215e27cebd784b09.tar.gz |
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
Diffstat (limited to 'ext/pulse')
-rw-r--r-- | ext/pulse/pulsesink.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c index abad2b806..eda321fce 100644 --- a/ext/pulse/pulsesink.c +++ b/ext/pulse/pulsesink.c @@ -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: { |