From e422232e6a5235e12fd143481d7d987d201a5208 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Tue, 18 May 2004 03:16:12 +0000 Subject: track number of times the port has being opened. rewiring a closed port won't cause the new destination to be opened. CVS patchset: 6564 CVS date: 2004/05/18 03:16:12 --- src/post/visualizations/fooviz.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/post/visualizations/fooviz.c') diff --git a/src/post/visualizations/fooviz.c b/src/post/visualizations/fooviz.c index f05689592..d4d671749 100644 --- a/src/post/visualizations/fooviz.c +++ b/src/post/visualizations/fooviz.c @@ -23,7 +23,7 @@ * process. It simply paints the screen a solid color and rotates through * colors on each iteration. * - * $Id: fooviz.c,v 1.21 2004/04/17 19:54:32 mroi Exp $ + * $Id: fooviz.c,v 1.22 2004/05/18 03:17:03 miguelfreitas Exp $ * */ @@ -116,6 +116,7 @@ static int fooviz_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream, port->bits = bits; port->rate = rate; port->mode = mode; + port->open_count++; this->ratio = (double)FOO_WIDTH/(double)FOO_HEIGHT; this->channels = _x_ao_mode2channels(mode); @@ -140,6 +141,8 @@ static void fooviz_port_close(xine_audio_port_t *port_gen, xine_stream_t *stream port->original_port->close(port->original_port, stream ); + port->open_count--; + _x_post_dec_usage(port); } -- cgit v1.2.3