Fix EPI.seekTo to balance operation acks when seeking during an ad

This regression was introduced in
b1e9257de1

Issue: #8349

PiperOrigin-RevId: 347802049
This commit is contained in:
ibaker 2020-12-16 13:06:31 +00:00 committed by Ian Baker
parent ffa746f390
commit d0e6dec199
2 changed files with 7 additions and 2 deletions

View File

@ -2,6 +2,9 @@
### 2.12.3 (???-??-??) ###
* Core library:
* Fix playback issues after seeking during an ad
([#8349](https://github.com/google/ExoPlayer/issues/8349)).
* UI:
* Fix issue where pop-up menus belonging to `StyledPlayerControlView`
would not be dismissed when tapping outside of the menu area or pressing

View File

@ -601,8 +601,10 @@ import java.util.concurrent.TimeoutException;
// general because the midroll ad preceding the seek destination must be played before the
// content position can be played, if a different ad is playing at the moment.
Log.w(TAG, "seekTo ignored because an ad is playing");
playbackInfoUpdateListener.onPlaybackInfoUpdate(
new ExoPlayerImplInternal.PlaybackInfoUpdate(playbackInfo));
ExoPlayerImplInternal.PlaybackInfoUpdate playbackInfoUpdate =
new ExoPlayerImplInternal.PlaybackInfoUpdate(this.playbackInfo);
playbackInfoUpdate.incrementPendingOperationAcks(1);
playbackInfoUpdateListener.onPlaybackInfoUpdate(playbackInfoUpdate);
return;
}
@Player.State