media/library/core/src/main
tonihei 80cdfd0cf0 Fix delayed discontinuity for failed ad insertions.
We have logic to not immediately interrupt playback when an ad group
fails to load and instead let the current content play and transition
at the point where the ad group should have been.

This logic was broken by dcbdbe5341 because of one of the conditions
used MediaPeriodId.adGroupIndex, which is always -1 for content ids.
It still worked for the last ad group because the next ad group index
was C.INDEX_UNSET.

Fix the issue and amend the test that was meant to catch this to test
the ad failures for the last ad and previous ads.

Also fix the PositionInfo reported in such a case, which was also wrong.

Issue: google/ExoPlayer#9929

#minor-release

PiperOrigin-RevId: 427143223
2022-02-08 17:20:22 +00:00
..
java/com/google/android/exoplayer2 Fix delayed discontinuity for failed ad insertions. 2022-02-08 17:20:22 +00:00
javadoc/com/google/android/exoplayer2/doc-files Update Timeline Javadoc to include brief mention of ad groups 2017-07-21 11:14:38 +01:00
res Move translated strings for download notification to lib-exoplayer 2021-10-20 13:39:38 +01:00
AndroidManifest.xml Add empty sdk-version node to all AndroidManifest.xml files 2021-09-21 14:17:33 +01:00