diff options
author | Guenter Bartsch <guenter@users.sourceforge.net> | 2002-10-28 20:15:56 +0000 |
---|---|---|
committer | Guenter Bartsch <guenter@users.sourceforge.net> | 2002-10-28 20:15:56 +0000 |
commit | c106b661bf06cf3abe17239863405ae412f71281 (patch) | |
tree | eb6934a0848c21bbd6698e8aeaa5c7c6bfd9c05d /src | |
parent | 94d7f444459d4f46553b5ef8fe37d58487fbdca2 (diff) | |
download | xine-lib-c106b661bf06cf3abe17239863405ae412f71281.tar.gz xine-lib-c106b661bf06cf3abe17239863405ae412f71281.tar.bz2 |
fix a deadlock
CVS patchset: 3075
CVS date: 2002/10/28 20:15:56
Diffstat (limited to 'src')
-rw-r--r-- | src/xine-engine/xine.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 02f4abf9b..9735c8497 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.179 2002/10/28 11:19:51 miguelfreitas Exp $ + * $Id: xine.c,v 1.180 2002/10/28 20:15:56 guenter Exp $ * * top-level xine functions * @@ -57,9 +57,9 @@ #include "xineutils.h" #include "compat.h" -/* + #define LOG -*/ + void xine_handle_stream_end (xine_stream_t *stream, int non_user) { @@ -386,6 +386,9 @@ static int xine_open_internal (xine_stream_t *stream, const char *mrl) { stream->meta_info[XINE_META_INFO_INPUT_PLUGIN] = strdup (stream->input_class->get_identifier (stream->input_class)); +#ifdef LOG + printf ("xine: input plugin found\n"); +#endif /* * find a demux plugin @@ -774,11 +777,15 @@ int xine_get_speed (xine_stream_t *stream) { */ static int xine_get_stream_length (xine_stream_t *stream) { - + pthread_mutex_lock( &stream->demux_lock ); - if (stream->demux_plugin) - return stream->demux_plugin->get_stream_length (stream->demux_plugin); + if (stream->demux_plugin) { + int len = stream->demux_plugin->get_stream_length (stream->demux_plugin); + pthread_mutex_unlock( &stream->demux_lock ); + + return len; + } pthread_mutex_unlock( &stream->demux_lock ); |