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_rtp.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_rtp.c')
-rw-r--r-- | src/input/input_rtp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/input/input_rtp.c b/src/input/input_rtp.c index f61b649c8..e576e6f53 100644 --- a/src/input/input_rtp.c +++ b/src/input/input_rtp.c @@ -288,7 +288,7 @@ static void * input_plugin_read_loop(void *arg) { /* * */ -static int rtp_plugin_open (input_plugin_t *this_gen, char *mrl ) { +static int rtp_plugin_open (input_plugin_t *this_gen, const char *mrl ) { rtp_input_plugin_t *this = (rtp_input_plugin_t *) this_gen; char *filename; char *pptr; @@ -296,10 +296,11 @@ static int rtp_plugin_open (input_plugin_t *this_gen, char *mrl ) { pthread_attr_t thread_attrs; int err; - this->mrl = mrl; + free(this->mrl); + this->mrl = strdup(mrl); - if ((!strncmp (mrl, "rtp://", 6)) || (!strncmp (mrl, "udp://", 6))) { - filename = &mrl[6]; + if ((!strncmp (this->mrl, "rtp://", 6)) || (!strncmp (this->mrl, "udp://", 6))) { + filename = &this->mrl[6]; if((!filename) || (strlen(filename) == 0)) return 0; @@ -497,6 +498,7 @@ static void rtp_plugin_dispose (input_plugin_t *this_gen ) { free (buf); } + free (this->mrl); free (this); } |