summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2003-06-22 17:10:41 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2003-06-22 17:10:41 +0000
commit3dc9fe628d0832bf2866afd9dc83e27ee85435e5 (patch)
tree7fc76f3b9a4c1e0cfc5eb73750927291ce52a493
parentcb110558df923589ef7faf98b6647cb39c55c241 (diff)
downloadxine-lib-3dc9fe628d0832bf2866afd9dc83e27ee85435e5.tar.gz
xine-lib-3dc9fe628d0832bf2866afd9dc83e27ee85435e5.tar.bz2
some additional pthread_*_destroy() calls
(based on the implementation, this might fix memleaks on some platforms, although I doubt that this is the case here) CVS patchset: 5091 CVS date: 2003/06/22 17:10:41
-rw-r--r--src/audio_out/audio_alsa_out.c4
-rw-r--r--src/xine-engine/audio_decoder.c4
-rw-r--r--src/xine-engine/audio_out.c15
-rw-r--r--src/xine-engine/video_decoder.c4
-rw-r--r--src/xine-engine/video_out.c4
5 files changed, 26 insertions, 5 deletions
diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c
index d4ab10c73..b14bc0c89 100644
--- a/src/audio_out/audio_alsa_out.c
+++ b/src/audio_out/audio_alsa_out.c
@@ -26,7 +26,7 @@
* (c) 2001 James Courtier-Dutton <James@superbug.demon.co.uk>
*
*
- * $Id: audio_alsa_out.c,v 1.94 2003/06/18 12:59:39 mroi Exp $
+ * $Id: audio_alsa_out.c,v 1.95 2003/06/22 17:10:41 mroi Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -1074,6 +1074,8 @@ static void ao_alsa_mixer_init(ao_driver_t *this_gen) {
pthread_attr_setschedparam(&pth_attrs, &pth_params);
pthread_create(&this->mixer.thread, &pth_attrs, ao_alsa_handle_event_thread, (void *) this);
+
+ pthread_attr_destroy(&pth_attrs);
}
}
diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c
index dcab13602..869b92c13 100644
--- a/src/xine-engine/audio_decoder.c
+++ b/src/xine-engine/audio_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_decoder.c,v 1.106 2003/04/02 12:28:08 hadess Exp $
+ * $Id: audio_decoder.c,v 1.107 2003/06/22 17:10:41 mroi Exp $
*
*
* functions that implement audio decoding
@@ -390,6 +390,8 @@ void audio_decoder_init (xine_stream_t *stream) {
strerror(err));
abort();
}
+
+ pthread_attr_destroy(&pth_attrs);
}
void audio_decoder_shutdown (xine_stream_t *stream) {
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c
index 0cfbd4625..ca82a1510 100644
--- a/src/xine-engine/audio_out.c
+++ b/src/xine-engine/audio_out.c
@@ -17,7 +17,7 @@
* along with self program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_out.c,v 1.131 2003/06/20 20:57:28 andruil Exp $
+ * $Id: audio_out.c,v 1.132 2003/06/22 17:10:41 mroi Exp $
*
* 22-8-2001 James imported some useful AC3 sections from the previous alsa driver.
* (c) 2001 Andy Lo A Foe <andy@alsaplayer.org>
@@ -1423,6 +1423,9 @@ static void ao_exit(xine_audio_port_t *this_gen) {
free (this->frame_buf[1]->extra_info);
free (this->frame_buf[1]);
free (this->zero_space);
+
+ pthread_mutex_destroy(&this->flush_audio_driver_lock);
+ pthread_cond_destroy(&this->flush_audio_driver_reached);
buf = this->free_fifo->first;
@@ -1450,6 +1453,14 @@ static void ao_exit(xine_audio_port_t *this_gen) {
buf = next;
}
+ pthread_mutex_destroy(&this->free_fifo->mutex);
+ pthread_cond_destroy(&this->free_fifo->empty);
+ pthread_cond_destroy(&this->free_fifo->not_empty);
+
+ pthread_mutex_destroy(&this->out_fifo->mutex);
+ pthread_cond_destroy(&this->out_fifo->empty);
+ pthread_cond_destroy(&this->out_fifo->not_empty);
+
free (this->free_fifo);
free (this->out_fifo);
free (this);
@@ -1870,6 +1881,8 @@ xine_audio_port_t *ao_new_port (xine_t *xine, ao_driver_t *driver,
} else
xprintf (this->xine, XINE_VERBOSITY_DEBUG, "thread created\n");
+
+ pthread_attr_destroy(&pth_attrs);
}
return &this->ao;
diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c
index 298c2f81f..bc6f3cd9e 100644
--- a/src/xine-engine/video_decoder.c
+++ b/src/xine-engine/video_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_decoder.c,v 1.134 2003/04/27 15:56:45 heinchen Exp $
+ * $Id: video_decoder.c,v 1.135 2003/06/22 17:10:41 mroi Exp $
*
*/
@@ -427,6 +427,8 @@ void video_decoder_init (xine_stream_t *stream) {
strerror(err));
abort();
}
+
+ pthread_attr_destroy(&pth_attrs);
}
void video_decoder_shutdown (xine_stream_t *stream) {
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c
index ccaa55c17..be977e1f8 100644
--- a/src/xine-engine/video_out.c
+++ b/src/xine-engine/video_out.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out.c,v 1.163 2003/06/13 01:50:45 miguelfreitas Exp $
+ * $Id: video_out.c,v 1.164 2003/06/22 17:10:41 mroi Exp $
*
* frame allocation / queuing / scheduling / output functions
*/
@@ -1522,6 +1522,8 @@ xine_video_port_t *vo_new_port (xine_t *xine, vo_driver_t *driver,
abort();
} else if (xine->verbosity >= XINE_VERBOSITY_DEBUG)
printf ("video_out: thread created\n");
+
+ pthread_attr_destroy(&pth_attrs);
}
return &this->vo;