Avoid fetching profile bitrate twice

This commit is contained in:
Serge Tkatchouk
2020-03-12 13:27:53 +00:00
committed by sentriz
parent 1ab96f67b5
commit c9eb142c61
+1 -1
View File
@@ -140,7 +140,7 @@ func CacheKey(sourcePath string, profile string, bitrate string) string {
// Check if client forces bitrate lower than set in profile:
func GetBitrate(clientBitrate int, profile *Profile) string {
bitrate := profile.Bitrate
if clientBitrate != 0 && clientBitrate < profile.Bitrate {
if clientBitrate != 0 && clientBitrate < bitrate {
bitrate = clientBitrate
}
return fmt.Sprintf("%dk", bitrate)