Skip to content

Commit

Permalink
Fix division by zero in MuxerWrapper
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 653644998
  • Loading branch information
ychaparov authored and copybara-github committed Jul 18, 2024
1 parent 1cbcd20 commit f8bdb7e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ public TrackInfo(Format format, TrackToken trackToken) {
* there is no track data.
*/
public int getAverageBitrate() {
if (timeUs <= 0 || bytesWritten <= 0) {
if (timeUs <= 0 || bytesWritten <= 0 || timeUs == startTimeUs) {
return C.RATE_UNSET_INT;
}

Expand Down

0 comments on commit f8bdb7e

Please sign in to comment.