summaryrefslogtreecommitdiff
path: root/libavformat/urldecode.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2020-02-04 23:44:28 +0100
committerMarton Balint <cus@passwd.hu>2020-02-15 18:41:36 +0100
commit8224f1e0ba65c064cf0fa2e11e4c688501b6eddd (patch)
treea32ddeb114d647b77c54090a33ef6ec849effa7e /libavformat/urldecode.c
parent6a7b5226e1c868fe6406b114e7303c70d886900b (diff)
avformat/urldecode: add the ability to not decode plus sign to space
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat/urldecode.c')
-rw-r--r--libavformat/urldecode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/urldecode.c b/libavformat/urldecode.c
index 283d912671..5261bcd0cd 100644
--- a/libavformat/urldecode.c
+++ b/libavformat/urldecode.c
@@ -32,7 +32,7 @@
#include "libavutil/avstring.h"
#include "urldecode.h"
-char *ff_urldecode(const char *url)
+char *ff_urldecode(const char *url, int decode_plus_sign)
{
int s = 0, d = 0, url_len = 0;
char c;
@@ -74,7 +74,7 @@ char *ff_urldecode(const char *url)
dest[d++] = c2;
dest[d++] = c3;
}
- } else if (c == '+') {
+ } else if (c == '+' && decode_plus_sign) {
dest[d++] = ' ';
} else {
dest[d++] = c;