diff options
author | Michael Roitzsch <mroi@users.sourceforge.net> | 2004-02-12 18:23:35 +0000 |
---|---|---|
committer | Michael Roitzsch <mroi@users.sourceforge.net> | 2004-02-12 18:23:35 +0000 |
commit | 6baca94d95492d4a3d74ba3f54c664e7f759b5f5 (patch) | |
tree | 16f070588077ae950d29a90ffd9817d998712b1d | |
parent | ee37b9c35aa5694d31e932c7b2bbb273b1055ad6 (diff) | |
download | xine-lib-6baca94d95492d4a3d74ba3f54c664e7f759b5f5.tar.gz xine-lib-6baca94d95492d4a3d74ba3f54c664e7f759b5f5.tar.bz2 |
* assign the ticket to the post plugins on allocation
* do not decrement the reference counter on post disposal, because post
plugins can delay their own disposal (if they realize that frames from
them are still around)
CVS patchset: 6139
CVS date: 2004/02/12 18:23:35
-rw-r--r-- | src/xine-engine/load_plugins.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index 6edc243b3..e484a58a2 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.171 2003/12/29 16:24:33 mroi Exp $ + * $Id: load_plugins.c,v 1.172 2004/02/12 18:23:35 mroi Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -47,6 +47,7 @@ */ #define XINE_ENABLE_EXPERIMENTAL_FEATURES 1 +#define XINE_ENGINE_INTERNAL #include "xine_internal.h" #include "xine_plugin.h" #include "plugin_catalog.h" @@ -1910,8 +1911,10 @@ xine_post_t *xine_post_init(xine_t *xine, const char *name, int inputs, xine_post_out_t *output; int i; - post->node = node; - node->ref++; + post->running_ticket = xine->port_ticket; + post->xine = xine; + post->node = node; + node->ref++; pthread_mutex_unlock(&catalog->lock); /* init the lists of announced connections */ @@ -1968,14 +1971,9 @@ xine_post_t *xine_post_init(xine_t *xine, const char *name, int inputs, void xine_post_dispose(xine_t *xine, xine_post_t *post_gen) { post_plugin_t *post = (post_plugin_t *)post_gen; - plugin_node_t *node = post->node; - - pthread_mutex_lock(&xine->plugin_catalog->lock); - free(post->input_ids); - free(post->output_ids); post->dispose(post); - node->ref--; - pthread_mutex_unlock(&xine->plugin_catalog->lock); + /* we cannot decrement the reference counter, since post plugins can delay + * their disposal if they are still in use => post.c handles the counting for us */ } /* get a list of file extensions for file types supported by xine |