Skip to content

Commit

Permalink
Return NO_VALUE if both Format are not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
StaehliJ committed Jul 25, 2024
1 parent e7f014b commit a5fb9e4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ internal class SessionMetrics internal constructor(
fun getTotalBitrate(): Long {
val videoBitrate = videoFormat?.bitrate ?: Format.NO_VALUE
val audioBitrate = audioFormat?.bitrate ?: Format.NO_VALUE
var bitrate = 0L
var bitrate = Format.NO_VALUE.toLong()
if (videoBitrate > 0) bitrate += videoBitrate
if (audioBitrate > 0) bitrate += audioBitrate
return bitrate
Expand Down

0 comments on commit a5fb9e4

Please sign in to comment.