[Bug 744461] pulsesink: Enhance code readability in pulsesink_query

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Feb 13 03:34:35 PST 2015


https://bugzilla.gnome.org/show_bug.cgi?id=744461

--- Comment #2 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
Comment on attachment 296762
  --> https://bugzilla.gnome.org/attachment.cgi?id=296762
pulsesink-Enhance-code-readability-in-pulsesink_query

>+  gboolean ret = FALSE;
> 
>   switch (GST_QUERY_TYPE (query)) {
>     case GST_QUERY_CAPS:
>@@ -3188,9 +3188,8 @@ gst_pulsesink_query (GstBaseSink * sink, GstQuery * query)
>         gst_query_set_caps_result (query, caps);
>         gst_caps_unref (caps);
>         return TRUE;
>-      } else {
>-        return FALSE;
>       }
>+      break;
>     }

Thanks for the patch. I think it's okay, even if I don't think that there's a
huge difference in readability here :)

You could go one step further then and turn the 'return TRUE' above into a
ret=TRUE; (and then let it go on to the break). That would be more in line with
other GStreamer code (avoiding returns in the middle of such functions).

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list