mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-19 23:26:14 +08:00
avformat/urldecode: add the ability to not decode plus sign to space
Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user