summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/xine-engine/load_plugins.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c
index 46535ef33..710e6dfbf 100644
--- a/src/xine-engine/load_plugins.c
+++ b/src/xine-engine/load_plugins.c
@@ -1339,11 +1339,13 @@ input_plugin_t *_x_find_input_plugin (xine_stream_t *stream, const char *mrl) {
void _x_free_input_plugin (xine_stream_t *stream, input_plugin_t *input) {
plugin_catalog_t *catalog = stream->xine->plugin_catalog;
+ plugin_node_t *node = input->node;
input->dispose(input);
- if (input->node) {
+
+ if (node) {
pthread_mutex_lock(&catalog->lock);
- dec_node_ref(input->node);
+ dec_node_ref(node);
pthread_mutex_unlock(&catalog->lock);
}
}
@@ -1560,11 +1562,13 @@ demux_plugin_t *_x_find_demux_plugin_last_probe(xine_stream_t *stream, const cha
void _x_free_demux_plugin (xine_stream_t *stream, demux_plugin_t *demux) {
plugin_catalog_t *catalog = stream->xine->plugin_catalog;
+ plugin_node_t *node = demux->node;
demux->dispose(demux);
- if (demux->node) {
+
+ if (node) {
pthread_mutex_lock(&catalog->lock);
- dec_node_ref(demux->node);
+ dec_node_ref(node);
pthread_mutex_unlock(&catalog->lock);
}
}
@@ -2054,12 +2058,13 @@ video_decoder_t *_x_get_video_decoder (xine_stream_t *stream, uint8_t stream_typ
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;
vd->dispose (vd);
- if (vd->node) {
+ if (node) {
pthread_mutex_lock (&catalog->lock);
- dec_node_ref(vd->node);
+ dec_node_ref(node);
pthread_mutex_unlock (&catalog->lock);
}
}