diff options
author | Michael Roitzsch <mroi@users.sourceforge.net> | 2002-09-06 18:13:10 +0000 |
---|---|---|
committer | Michael Roitzsch <mroi@users.sourceforge.net> | 2002-09-06 18:13:10 +0000 |
commit | 6c4cd36cc5ced530a387327c4f6c576074424c6c (patch) | |
tree | 335cf36c9732583e317983a126ec508e2d08ce0b /src/input/input_net.c | |
parent | 75dc355377ef3cc01cfec10a1872ad64eee154ae (diff) | |
download | xine-lib-6c4cd36cc5ced530a387327c4f6c576074424c6c.tar.gz xine-lib-6c4cd36cc5ced530a387327c4f6c576074424c6c.tar.bz2 |
introduce "const"
fix some input plugins that would not copy the mrl on open
CVS patchset: 2623
CVS date: 2002/09/06 18:13:10
Diffstat (limited to 'src/input/input_net.c')
-rw-r--r-- | src/input/input_net.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/input/input_net.c b/src/input/input_net.c index 9df193864..a4afe2375 100644 --- a/src/input/input_net.c +++ b/src/input/input_net.c @@ -139,13 +139,14 @@ static int host_connect(const char *host, int port, xine_t *xine) { return -1; } -static int net_plugin_open (input_plugin_t *this_gen, char *mrl) { +static int net_plugin_open (input_plugin_t *this_gen, const char *mrl) { net_input_plugin_t *this = (net_input_plugin_t *) this_gen; char *filename; char *pptr; int port = 7658; - this->mrl = strdup(mrl); /* FIXME: small memory leak */ + free(this->mrl); + this->mrl = strdup(mrl); if (!strncasecmp (mrl, "tcp://", 6)) { filename = (char *) &this->mrl[6]; @@ -170,8 +171,6 @@ static int net_plugin_open (input_plugin_t *this_gen, char *mrl) { return 0; } - this->mrl = strdup(mrl); /* FIXME: small memory leak */ - this->nbc = nbc_init (this->xine); return 1; @@ -328,6 +327,8 @@ static int net_plugin_get_optional_data (input_plugin_t *this_gen, } static void net_plugin_dispose (input_plugin_t *this_gen ) { + net_input_plugin_t *this = (net_input_plugin_t *) this_gen; + free (this->mrl); free (this_gen); } |