From abb86364c2c01f1daebf0b217d79416720eedb49 Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Sun, 11 Apr 2004 14:51:20 +0000 Subject: decoder plugins must be disposed outside the plugin catalog lock, because they might call port->close(), which might finish a pending disposal of a post plugin, which will try to decrement the reference count for that plugin, which will try to grab the plugin catalog lock... CVS patchset: 6393 CVS date: 2004/04/11 14:51:20 --- ChangeLog | 1 + src/xine-engine/load_plugins.c | 16 +++++----------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 20b542204..1c956c552 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,7 @@ xine-lib (1-rc4) * libvcd updated to 0.7.20 * libcdio updated to 0.68 * build improvements - different source and build directory, translations + * avoid deadlock with raw AC3 streams and visualization xine-lib (1-rc3c) * fix the deadlock with non-seekable input plugins diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index 94d8e62f2..92bbaef66 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.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: load_plugins.c,v 1.173 2004/03/03 20:09:17 mroi Exp $ + * $Id: load_plugins.c,v 1.174 2004/04/11 14:51:20 mroi Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -1637,13 +1637,11 @@ void _x_free_video_decoder (xine_stream_t *stream, video_decoder_t *vd) { plugin_catalog_t *catalog = stream->xine->plugin_catalog; plugin_node_t *node = vd->node; - pthread_mutex_lock (&catalog->lock); - - vd->dispose (vd); + + pthread_mutex_lock (&catalog->lock); node->ref--; /* FIXME: unload plugin if no-longer used */ - pthread_mutex_unlock (&catalog->lock); } @@ -1712,13 +1710,11 @@ void _x_free_audio_decoder (xine_stream_t *stream, audio_decoder_t *ad) { plugin_catalog_t *catalog = stream->xine->plugin_catalog; plugin_node_t *node = ad->node; - pthread_mutex_lock (&catalog->lock); - ad->dispose (ad); + pthread_mutex_lock (&catalog->lock); node->ref--; /* FIXME: unload plugin if no-longer used */ - pthread_mutex_unlock (&catalog->lock); } @@ -1786,13 +1782,11 @@ void _x_free_spu_decoder (xine_stream_t *stream, spu_decoder_t *sd) { plugin_catalog_t *catalog = stream->xine->plugin_catalog; plugin_node_t *node = sd->node; - pthread_mutex_lock (&catalog->lock); - sd->dispose (sd); + pthread_mutex_lock (&catalog->lock); node->ref--; /* FIXME: unload plugin if no-longer used */ - pthread_mutex_unlock (&catalog->lock); } -- cgit v1.2.3