diff options
author | Michael Roitzsch <mroi@users.sourceforge.net> | 2004-04-11 14:51:20 +0000 |
---|---|---|
committer | Michael Roitzsch <mroi@users.sourceforge.net> | 2004-04-11 14:51:20 +0000 |
commit | abb86364c2c01f1daebf0b217d79416720eedb49 (patch) | |
tree | 23a00d2551564274e61711aacb463b8ac81f1d04 | |
parent | 936702e3a2d0ae1947ab0ffd2af72b4af9e8d32f (diff) | |
download | xine-lib-abb86364c2c01f1daebf0b217d79416720eedb49.tar.gz xine-lib-abb86364c2c01f1daebf0b217d79416720eedb49.tar.bz2 |
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
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/xine-engine/load_plugins.c | 16 |
2 files changed, 6 insertions, 11 deletions
@@ -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); } |