summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBastien Nocera <hadess@users.sourceforge.net>2004-04-05 17:58:54 +0000
committerBastien Nocera <hadess@users.sourceforge.net>2004-04-05 17:58:54 +0000
commit4b62d4a577a66e5423c6e9c3bbb28336fb29c332 (patch)
treee3fed74957b3bab645cd60962ada62aa778f6ea2 /src
parentec4796772a41b2ca7cf2788547a280d92989bbf2 (diff)
downloadxine-lib-4b62d4a577a66e5423c6e9c3bbb28336fb29c332.tar.gz
xine-lib-4b62d4a577a66e5423c6e9c3bbb28336fb29c332.tar.bz2
- remove stream from the streams list when it is disposed
CVS patchset: 6329 CVS date: 2004/04/05 17:58:54
Diffstat (limited to 'src')
-rw-r--r--src/xine-engine/xine.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index b18b44c0d..3648de0b4 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.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: xine.c,v 1.286 2004/03/23 22:54:31 valtri Exp $
+ * $Id: xine.c,v 1.287 2004/04/05 17:58:54 hadess Exp $
*/
/*
@@ -1182,6 +1182,8 @@ int xine_eject (xine_stream_t *stream) {
void xine_dispose (xine_stream_t *stream) {
+ xine_stream_t *s;
+
xprintf (stream->xine, XINE_VERBOSITY_DEBUG, "xine_dispose\n");
stream->status = XINE_STATUS_QUIT;
@@ -1220,6 +1222,16 @@ void xine_dispose (xine_stream_t *stream) {
stream->metronom->exit (stream->metronom);
+ pthread_mutex_lock(&stream->xine->streams_lock);
+ for (s = xine_list_first_content(stream->xine->streams);
+ s; s = xine_list_next_content(stream->xine->streams)) {
+ if (s == stream) {
+ xine_list_delete_current (stream->xine->streams);
+ break;
+ }
+ }
+ pthread_mutex_unlock(&stream->xine->streams_lock);
+
free (stream->current_extra_info);
free (stream->video_decoder_extra_info);
free (stream->audio_decoder_extra_info);