diff options
author | Thibaut Mattern <tmattern@users.sourceforge.net> | 2005-03-06 11:08:40 +0000 |
---|---|---|
committer | Thibaut Mattern <tmattern@users.sourceforge.net> | 2005-03-06 11:08:40 +0000 |
commit | 4be4c9d1bbf057f7117e286bede19f599138030d (patch) | |
tree | 709646988a4ca6671cbeea0325d00ef969c1ecda /src/xine-engine/xine.c | |
parent | 2cd0a3433ae8f07e7211d2c7b34e17a27de49a26 (diff) | |
download | xine-lib-4be4c9d1bbf057f7117e286bede19f599138030d.tar.gz xine-lib-4be4c9d1bbf057f7117e286bede19f599138030d.tar.bz2 |
Fixed pthread leak, the demuxer thread was not joined in all cases.
See this thread for more info:
http://thread.gmane.org/gmane.comp.video.xine.devel/12377
CVS patchset: 7432
CVS date: 2005/03/06 11:08:40
Diffstat (limited to 'src/xine-engine/xine.c')
-rw-r--r-- | src/xine-engine/xine.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 0ac89b2c7..f9639e89e 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.311 2005/02/19 13:11:52 valtri Exp $ + * $Id: xine.c,v 1.312 2005/03/06 11:08:40 tmattern Exp $ */ /* @@ -276,26 +276,23 @@ static void stop_internal (xine_stream_t *stream) { if ( stream->status == XINE_STATUS_IDLE || stream->status == XINE_STATUS_STOP ) { _x_demux_control_end(stream, 0); - lprintf ("ignored\n"); - return; - } - - /* make sure we're not in "paused" state */ - set_speed_internal (stream, XINE_FINE_SPEED_NORMAL); - - /* Don't change status if we're quitting */ - if (stream->status != XINE_STATUS_QUIT) - stream->status = XINE_STATUS_STOP; + lprintf("ignored"); + } else { + /* make sure we're not in "paused" state */ + set_speed_internal (stream, XINE_FINE_SPEED_NORMAL); + /* Don't change status if we're quitting */ + if (stream->status != XINE_STATUS_QUIT) + stream->status = XINE_STATUS_STOP; + } /* * stop demux */ - lprintf ("stopping demux\n"); - if (stream->demux_plugin) { + if (stream->demux_plugin && stream->demux_thread) { + lprintf ("stopping demux\n"); _x_demux_stop_thread( stream ); - lprintf ("stop thread done\n"); + lprintf ("demux stopped\n"); } - lprintf ("demux stopped\n"); lprintf ("done\n"); } |