Read muxedPartialVideo only in MUXER_MODE_MUX_PARTIAL_VIDEO mode

When we switch from MUXER_MODE_MUX_PARTIAL_VIDEO to MUXER_MODE_APPEND_VIDEO
`muxedPartialVideo` will already be `true` so `endTrack` method will pass
through this `if(muxedPartialVideo)` check which is incorrect.

PiperOrigin-RevId: 565398117
This commit is contained in:
sheenachhabra 2023-09-14 09:52:13 -07:00 committed by Copybara-Service
parent d58f5fdf7d
commit 03b793e2ee

View file

@ -369,7 +369,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
}
}
if (muxedPartialVideo) {
if (muxerMode == MUXER_MODE_MUX_PARTIAL_VIDEO && muxedPartialVideo) {
listener.onEnded(Util.usToMs(maxEndedTrackTimeUs), getCurrentOutputSizeBytes());
if (abortScheduledFuture != null) {
abortScheduledFuture.cancel(/* mayInterruptIfRunning= */ false);