fix it fr

This commit is contained in:
Olive Vaughn 2026-08-26 02:33:58 -04:00
parent aec97e9972
commit d09c96f5d5

View file

@ -1,5 +1,4 @@
diff --git a/transcoder/handler.go b/transcoder/handler.go
index 8c5bb08..0ad7458 100644
--- a/transcoder/handler.go
+++ b/transcoder/handler.go
@@ -37,6 +37,14 @@ func NewHandler(c *Config) *Handler {
@ -17,8 +16,26 @@ index 8c5bb08..0ad7458 100644
// Check version if monitoring is enabled
if h.c.VersionMonitor && !h.versionOk(w, r) {
return
@@ -55,15 +63,15 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
// Serve actual file from manager
- if len(parts) < 3 {
+ if len(parts) < 5 || parts[0] != "vod" {
log.Println("Invalid URL", url)
w.WriteHeader(http.StatusBadRequest)
return
}
// Get streamid and chunk
- streamid := parts[0]
- path := "/" + strings.Join(parts[1:len(parts)-1], "/")
+ streamid := parts[1]
+ path := "/" + strings.Join(parts[2:len(parts)-1], "/")
chunk := parts[len(parts)-1]
// Check if POST request to create temp file
diff --git a/transcoder/stream.go b/transcoder/stream.go
index cf353fc..f8694fc 100644
--- a/transcoder/stream.go
+++ b/transcoder/stream.go
@@ -370,8 +370,12 @@ func (s *Stream) transcodeArgs(startAt float64, isHls bool) []string {