mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Fix division by zero in MuxerWrapper
PiperOrigin-RevId: 653644998
This commit is contained in:
parent
1cbcd20851
commit
f8bdb7e59f
@ -798,7 +798,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||||||
* there is no track data.
|
* there is no track data.
|
||||||
*/
|
*/
|
||||||
public int getAverageBitrate() {
|
public int getAverageBitrate() {
|
||||||
if (timeUs <= 0 || bytesWritten <= 0) {
|
if (timeUs <= 0 || bytesWritten <= 0 || timeUs == startTimeUs) {
|
||||||
return C.RATE_UNSET_INT;
|
return C.RATE_UNSET_INT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user