Rewrite ffmpeg query format

This commit is contained in:
Alexey Khit
2022-08-21 06:56:24 +03:00
parent 64c0f287ed
commit 92c67df7b4
2 changed files with 17 additions and 4 deletions

View File

@@ -54,7 +54,7 @@ func Init() {
var query url.Values
if i := strings.IndexByte(s, '#'); i > 0 {
query, _ = url.ParseQuery(s[i+1:])
query = parseQuery(s[i+1:])
s = s[:i]
}
@@ -110,3 +110,16 @@ func Init() {
return exec.Handle(s)
})
}
func parseQuery(s string) map[string][]string {
query := map[string][]string{}
for _, key := range strings.Split(s, "#") {
var value string
i := strings.IndexByte(key, '=')
if i > 0 {
key, value = key[:i], key[i+1:]
}
query[key] = append(query[key], value)
}
return query
}