diff --git a/core/uploader.go b/core/uploader.go index 064f1a6..85d2d6a 100644 --- a/core/uploader.go +++ b/core/uploader.go @@ -35,6 +35,8 @@ func Upload(input io.Reader, outputURI string, waitBetweenWrites, writeTimeout t } if strings.HasSuffix(outputURI, ".ts") || strings.HasSuffix(outputURI, ".mp4") { + // For segments we just write them in one go here and return early. + // (Otherwise the incremental write logic below caused issues with clipping since it results in partial segments being written.) _, err := session.SaveData(context.Background(), "", input, fields, writeTimeout) return err }