Fix loop request, ex. camera1: ffmpeg:camera1

This commit is contained in:
Alex X
2024-11-09 18:17:41 +03:00
parent 2c34a17d88
commit 340fd81778
4 changed files with 16 additions and 0 deletions

View File

@@ -179,6 +179,7 @@ func parseArgs(s string) *ffmpeg.Args {
Version: verAV,
}
var source = s
var query url.Values
if i := strings.IndexByte(s, '#'); i >= 0 {
query = streams.ParseQuery(s[i+1:])
@@ -221,6 +222,7 @@ func parseArgs(s string) *ffmpeg.Args {
default:
s += "?video&audio"
}
s += "&source=ffmpeg:" + url.QueryEscape(source)
args.Input = inputTemplate("rtsp", s, query)
} else if i = strings.Index(s, "?"); i > 0 {
switch s[:i] {