diff options
author | Josh Blum | 2009-09-02 14:06:34 -0700 |
---|---|---|
committer | Josh Blum | 2009-09-02 14:06:34 -0700 |
commit | eb1d1b5cfb474b087d41337356efc0cdb7342f28 (patch) | |
tree | 61f573888ff79a514a51be2b3fee7b6fdcfec808 /gr-wxgui/src/python/plotter/waterfall_plotter.py | |
parent | 6fb2acc3c49e3bb7b8845d517c4bff4a8f5b0fa8 (diff) | |
download | gnuradio-eb1d1b5cfb474b087d41337356efc0cdb7342f28.tar.gz gnuradio-eb1d1b5cfb474b087d41337356efc0cdb7342f28.tar.bz2 gnuradio-eb1d1b5cfb474b087d41337356efc0cdb7342f28.zip |
Fix so that the waterfall texture is initialized with a buffer of the same size.
If the fft size was a non power of two, the buffer would be a different size.
This would cause a segfault. Particularly because fft_window was throwing out a bin.
Diffstat (limited to 'gr-wxgui/src/python/plotter/waterfall_plotter.py')
-rw-r--r-- | gr-wxgui/src/python/plotter/waterfall_plotter.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gr-wxgui/src/python/plotter/waterfall_plotter.py b/gr-wxgui/src/python/plotter/waterfall_plotter.py index 2e0669961..d32b0ca0a 100644 --- a/gr-wxgui/src/python/plotter/waterfall_plotter.py +++ b/gr-wxgui/src/python/plotter/waterfall_plotter.py @@ -209,7 +209,7 @@ class waterfall_plotter(grid_plotter_base): self._pointer = 0 if self._num_lines and self._fft_size: GL.glBindTexture(GL.GL_TEXTURE_2D, self._waterfall_texture) - data = numpy.zeros(self._num_lines*self._fft_size*4, numpy.uint8).tostring() + data = numpy.zeros(self._num_lines*ceil_log2(self._fft_size)*4, numpy.uint8).tostring() GL.glTexImage2D(GL.GL_TEXTURE_2D, 0, GL.GL_RGBA, ceil_log2(self._fft_size), self._num_lines, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, data) self._resize_texture_flag = False |