summaryrefslogtreecommitdiff
path: root/src/input/input_rtp.c
diff options
context:
space:
mode:
authorDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2002-05-05 20:20:10 +0000
committerDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2002-05-05 20:20:10 +0000
commit259a762d997a3fc55839d291ead7858784f7931f (patch)
tree18512578d8588ea0743c3c4cbc70b564e960dcc9 /src/input/input_rtp.c
parent55458a1d4e415713a605c1f0e863e7b22c195422 (diff)
downloadxine-lib-259a762d997a3fc55839d291ead7858784f7931f.tar.gz
xine-lib-259a762d997a3fc55839d291ead7858784f7931f.tar.bz2
Fixed mrl checking (mrl:// wasn't respected).
CVS patchset: 1853 CVS date: 2002/05/05 20:20:10
Diffstat (limited to 'src/input/input_rtp.c')
-rw-r--r--src/input/input_rtp.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/input/input_rtp.c b/src/input/input_rtp.c
index 3ae00d017..879709138 100644
--- a/src/input/input_rtp.c
+++ b/src/input/input_rtp.c
@@ -298,27 +298,27 @@ static int rtp_plugin_open (input_plugin_t *this_gen, char *mrl ) {
this->mrl = mrl;
- if (!strncmp (mrl, "rtp:",4)) {
- filename = &mrl[4];
- } else if (!strncmp (mrl, "udp:",4)) {
- filename = &mrl[4];
- } else
- return 0;
+ if ((!strncmp (mrl, "rtp://", 6)) || (!strncmp (mrl, "udp://", 6))) {
+ filename = &mrl[6];
+
+ if((!filename) || (strlen(filename) == 0))
+ return 0;
- if(strncmp(filename, "//", 2)==0)
- filename+=2;
+ }
+ else
+ return 0;
LOG_MSG(this->xine, _("Opening >%s<\n"), filename);
pptr=strrchr(filename, ':');
- if(pptr)
- {
- *pptr++=0;
+ if(pptr) {
+ *pptr++ = 0;
sscanf(pptr,"%d", &port);
}
if (this->fh != -1)
close(this->fh);
+
this->fh = host_connect(filename, port, this->xine);
if (this->fh == -1) {