mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Deduplicate calls to maybeNotifyPlaybackInfoChanged
PiperOrigin-RevId: 374253036
This commit is contained in:
parent
25b453a5fe
commit
c7db9fb390
1 changed files with 1 additions and 4 deletions
|
|
@ -545,7 +545,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||
default:
|
||||
return false;
|
||||
}
|
||||
maybeNotifyPlaybackInfoChanged();
|
||||
} catch (ExoPlaybackException e) {
|
||||
if (e.type == ExoPlaybackException.TYPE_RENDERER) {
|
||||
@Nullable MediaPeriodHolder readingPeriod = queue.getReadingPeriod();
|
||||
|
|
@ -571,7 +570,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||
stopInternal(/* forceResetRenderers= */ true, /* acknowledgeStop= */ false);
|
||||
playbackInfo = playbackInfo.copyWithPlaybackError(e);
|
||||
}
|
||||
maybeNotifyPlaybackInfoChanged();
|
||||
} catch (IOException e) {
|
||||
ExoPlaybackException error = ExoPlaybackException.createForSource(e);
|
||||
@Nullable MediaPeriodHolder playingPeriod = queue.getPlayingPeriod();
|
||||
|
|
@ -582,14 +580,13 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||
Log.e(TAG, "Playback error", error);
|
||||
stopInternal(/* forceResetRenderers= */ false, /* acknowledgeStop= */ false);
|
||||
playbackInfo = playbackInfo.copyWithPlaybackError(error);
|
||||
maybeNotifyPlaybackInfoChanged();
|
||||
} catch (RuntimeException e) {
|
||||
ExoPlaybackException error = ExoPlaybackException.createForUnexpected(e);
|
||||
Log.e(TAG, "Playback error", error);
|
||||
stopInternal(/* forceResetRenderers= */ true, /* acknowledgeStop= */ false);
|
||||
playbackInfo = playbackInfo.copyWithPlaybackError(error);
|
||||
maybeNotifyPlaybackInfoChanged();
|
||||
}
|
||||
maybeNotifyPlaybackInfoChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue