manager: prevent duplicate max stream

monorepo
Varun Patil 2023-10-24 18:01:57 -07:00
parent 2438a2946d
commit a8ad3e95c6
2 changed files with 2 additions and 2 deletions

View File

@ -94,7 +94,7 @@ func NewManager(c *Config, path string, id string, close chan string) (*Manager,
stream.width = int(math.Ceil(float64(lgDim) * float64(stream.height) / float64(smDim))) stream.width = int(math.Ceil(float64(lgDim) * float64(stream.height) / float64(smDim)))
// remove invalid streams // remove invalid streams
if (stream.height > smDim || stream.width > lgDim) || // no upscaling; we're not AI if (stream.height >= smDim || stream.width >= lgDim) || // no upscaling; we're not AI
(float64(stream.bitrate) > float64(m.probe.BitRate)*0.8) || // no more than 80% of original bitrate (float64(stream.bitrate) > float64(m.probe.BitRate)*0.8) || // no more than 80% of original bitrate
(stream.height%2 != 0 || stream.width%2 != 0) { // no odd dimensions (stream.height%2 != 0 || stream.width%2 != 0) { // no odd dimensions

View File

@ -8,7 +8,7 @@ import (
"github.com/pulsejet/go-vod/go_vod" "github.com/pulsejet/go-vod/go_vod"
) )
const VERSION = "0.1.21" const VERSION = "0.1.22"
func main() { func main() {
// Build initial configuration // Build initial configuration