[Bug 744213] spectrum: assertion 'len > 0' failed

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sun Feb 15 18:28:04 PST 2015


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

Nicolas Dufresne (stormer) <nicolas.dufresne at collabora.co.uk> changed:

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

--- Comment #2 from Nicolas Dufresne (stormer) <nicolas.dufresne at collabora.co.uk> ---
Review of attachment 296439:
 --> (https://bugzilla.gnome.org/review?bug=744213&attachment=296439)

::: gst/spectrum/gstspectrum.c
@@ +202,3 @@
   g_object_class_install_property (gobject_class, PROP_BANDS,
       g_param_spec_uint ("bands", "Bands", "Number of frequency bands",
+          1, G_MAXUINT / 2, DEFAULT_BANDS,

Minimum shall be 2 according to the formula you showed.

  nfft = 2 * 1 - 2 == -1

Which also triggers the assertion from testing. The upper limit is also not
correct. gst_fft_32_new() takes a len argument of type signed integer. That
means nfft need to be smaller or equal to G_MAXINT. That means the the maximum
possible value for bands is in fact:

  ((guint)G_MAXINT + 2) / 2

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