summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2004-12-13 19:05:01 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2004-12-13 19:05:01 +0000
commit22f13d873ad705332f8d2e4dd39050b9716d4c4c (patch)
tree3d43dbf935ed96964282f89c41bd321e13c1517f
parenta416215d6783b71ad87b47fc1f35c07e22a7de29 (diff)
downloadxine-lib-22f13d873ad705332f8d2e4dd39050b9716d4c4c.tar.gz
xine-lib-22f13d873ad705332f8d2e4dd39050b9716d4c4c.tar.bz2
fix segfault
CVS patchset: 7246 CVS date: 2004/12/13 19:05:01
-rw-r--r--src/post/visualizations/fftgraph.c9
-rw-r--r--src/post/visualizations/fftscope.c7
2 files changed, 11 insertions, 5 deletions
diff --git a/src/post/visualizations/fftgraph.c b/src/post/visualizations/fftgraph.c
index 1b88b4521..7ac5d74ac 100644
--- a/src/post/visualizations/fftgraph.c
+++ b/src/post/visualizations/fftgraph.c
@@ -20,7 +20,7 @@
* FftGraph Visualization Post Plugin For xine
* by Thibaut Mattern (tmattern@noos.fr)
*
- * $Id: fftgraph.c,v 1.12 2004/05/29 14:45:26 mroi Exp $
+ * $Id: fftgraph.c,v 1.13 2004/12/13 19:05:01 miguelfreitas Exp $
*
*/
@@ -327,7 +327,7 @@ static void fftgraph_port_put_buffer (xine_audio_port_t *port_gen,
/* pass data to original port */
port->original_port->put_buffer(port->original_port, buf, stream );
-
+
/* we must not use original data anymore, it should have already being moved
* to the fifo of free audio buffers. just use our private copy instead.
*/
@@ -379,7 +379,10 @@ static void fftgraph_port_put_buffer (xine_audio_port_t *port_gen,
this->sample_counter -= this->samples_per_frame;
- draw_fftgraph(this, frame);
+ if( this->fft )
+ draw_fftgraph(this, frame);
+ else
+ frame->bad_frame = 1;
frame->draw(frame, XINE_ANON_STREAM);
frame->free(frame);
diff --git a/src/post/visualizations/fftscope.c b/src/post/visualizations/fftscope.c
index 95ed6969e..02b92bf31 100644
--- a/src/post/visualizations/fftscope.c
+++ b/src/post/visualizations/fftscope.c
@@ -22,7 +22,7 @@
*
* FFT code by Steve Haehnichen, originally licensed under GPL v1
*
- * $Id: fftscope.c,v 1.27 2004/05/29 14:45:26 mroi Exp $
+ * $Id: fftscope.c,v 1.28 2004/12/13 19:05:13 miguelfreitas Exp $
*
*/
@@ -400,7 +400,10 @@ static void fftscope_port_put_buffer (xine_audio_port_t *port_gen,
this->sample_counter -= this->samples_per_frame;
- draw_fftscope(this, frame);
+ if( this->fft )
+ draw_fftscope(this, frame);
+ else
+ frame->bad_frame = 1;
frame->draw(frame, XINE_ANON_STREAM);
frame->free(frame);