[Bug 761588] opusdec: no mono/stereo channel conversion

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Feb 26 12:52:57 UTC 2016


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

Sebastian Dröge (slomo) <slomo at coaxion.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #322456|none                        |needs-work
             status|                            |

--- Comment #33 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 322456:
 --> (https://bugzilla.gnome.org/review?bug=761588&attachment=322456)

Ok, thanks :) just one last simple thing I hope

::: ext/opus/gstopusdec.c
@@ +240,3 @@
+    constraint = gst_caps_from_string ("audio/x-raw");
+    if (dec->sample_rate == 0) {
+      if (dec->n_channels == 0) {

You can split these two ifs to reduce indentation.

if (dec->sample_rate == 0) {

}

if (dec->n_channels == 0) {

}

Just call gst_caps_set_simple() twice.

@@ +261,3 @@
+      g_value_unset (&v);
+      g_value_unset (&l);
+      if (dec->n_channels == 0) {

It will default to stereo below, but shouldn't we ideally check here then if
downstream accepts stereo? And for consistency, should we go mono or stereo,
depending on what downstream accepts (i.e. go into the <= 2 case too), and
prefer stereo? (i.e. fixate_nearest_int(2) further below).

-- 
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