Fix missing default video bitrate if none is supplied

This commit is contained in:
Gabe Kangas 2020-07-15 23:56:14 -07:00
parent a277012650
commit 2afde7b3f9

View file

@ -146,7 +146,7 @@ func getVariantFromConfigQuality(quality config.StreamQuality, index int) HLSVar
} }
if quality.VideoBitrate == 0 { if quality.VideoBitrate == 0 {
variant.isVideoPassthrough = true quality.VideoBitrate = 1000
} }
// If the video is being passed through then // If the video is being passed through then
@ -202,6 +202,7 @@ func NewTranscoder() Transcoder {
defaultQuality.EncoderPreset = "superfast" defaultQuality.EncoderPreset = "superfast"
qualities = append(qualities, defaultQuality) qualities = append(qualities, defaultQuality)
} }
for index, quality := range qualities { for index, quality := range qualities {
variant := getVariantFromConfigQuality(quality, index) variant := getVariantFromConfigQuality(quality, index)
transcoder.AddVariant(variant) transcoder.AddVariant(variant)