Code refactoring for #1450

This commit is contained in:
Alex X
2024-11-11 17:45:55 +03:00
parent 831aa03c9f
commit 570b7d0d97
3 changed files with 17 additions and 37 deletions
+3 -2
View File
@@ -223,8 +223,9 @@ func parseArgs(s string) *ffmpeg.Args {
s += "?video&audio"
}
s += "&source=ffmpeg:" + url.QueryEscape(source)
// change codec not matched error level to debug
s += "&" + string(streams.CodecNotMatchedErrorCode) + "=" + zerolog.DebugLevel.String()
for _, v := range query["query"] {
s += "&" + v
}
args.Input = inputTemplate("rtsp", s, query)
} else if i = strings.Index(s, "?"); i > 0 {
switch s[:i] {