diff --git a/patches/go-vod-sheepflix.patch b/patches/go-vod-sheepflix.patch index eb442cc..84d0bb7 100644 --- a/patches/go-vod-sheepflix.patch +++ b/patches/go-vod-sheepflix.patch @@ -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 {