aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-08-13 12:09:25 +0000
committerGravatar albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-08-13 12:09:25 +0000
commit9be023633c65017efb6c3ac4bb1f490fc856b459 (patch)
treead48a1af30a4be68ee68aed7b81777cfb18661f4
parente5e805b73ff0bdf92799e6ae371d6e2005b4df46 (diff)
Fix a 10l and add escaped filename support. Needed by ftp.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10593 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--m_option.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/m_option.c b/m_option.c
index 8ed3ccfeab..fefc9ac605 100644
--- a/m_option.c
+++ b/m_option.c
@@ -1672,6 +1672,8 @@ static int parse_custom_url(m_option_t* opt,char *name,
}
}
}
+ ptr1 = ptr2+1;
+ pos1 = ptr1-url;
}
// before looking for a port number check if we have an IPv6 type numeric address
@@ -1752,7 +1754,15 @@ static int parse_custom_url(m_option_t* opt,char *name,
// skip
} else {
if(dst) {
- r = m_struct_set(desc,dst,"filename",ptr2+1);
+ int l = strlen(ptr2+1) + 1;
+ char* fname = ptr2+1;
+ if(l > 1) {
+ fname = malloc(l);
+ url_unescape_string(fname,ptr2+1);
+ }
+ r = m_struct_set(desc,dst,"filename",fname);
+ if(fname != ptr2+1)
+ free(fname);
if(r < 0) {
mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Option %s: error while setting filename\n",name);
return r;