media/libraries
tonihei ca51ed649b Fix single sample handling ProgressiveMediaPeriod when disabling tracks
When deselecting the single sample track and later re-selecting this
track, the current shortcuts in ProgressiveMediaPeriod don't handle
this case correctly and cause assertion failures.

In particular, this change fixes 3 issues:
 1. When re-selecting the single sample track, we have cleared the
    SampleQueue and need to reload the sample. The existing shortcut
    should only be applied to avoid the reload when starting from a
    non-zero position.
 2. When de-selecting the track, ProgressiveMediaPeriod is left in
    an inconsistent state where the sample queues are empty but
    loadingFinished is still true. Fix this by resetting
    loadingFinished to false.
 3. When seeking, we avoid reloading the stream if we can keep
    inside the existing samples. This logic assumes that all
    remaining samples will continue to be loaded in the queue.
    This condition isn't true though for single sample tracks
    that have been de-selected. They appear to support the seek
    inside the queue (=no seek necessary, always supported), but
    still require a new load if there is no ongoing one to load
    the sample. Fix this by checking this implicit assumption
    (still loading, or loading finished).

PiperOrigin-RevId: 642650248
2024-06-12 10:08:10 -07:00
..
cast Forward presumed no-op seeks to handler methods in (Simple)BasePlayer 2024-04-15 02:38:29 -07:00
common Sync and map fatal and non-fatal errors from and to the legacy session 2024-06-12 06:26:00 -07:00
container Add Mp4OrientationData class 2024-03-11 06:45:15 -07:00
database Do not trim audio samples by changing their timestamp 2023-06-29 22:50:04 +00:00
datasource Fix an invalid javadoc link 2024-06-10 07:34:29 -07:00
datasource_cronet Remove deprecated setContentTypePredicate() methods 2024-05-23 08:32:26 -07:00
datasource_okhttp Remove OkHttpDataSource constructors & OkHttDataSourceFactory 2024-05-23 10:03:12 -07:00
datasource_rtmp Remove exoplayer2-only javadoc machinery from media3 2023-06-05 09:47:58 +00:00
decoder Don't enforce SimpleDecoder skipping for samples before start time 2024-05-01 06:42:36 -07:00
decoder_av1 Replace or suppress deprecated usages 2024-01-26 10:06:18 -08:00
decoder_ffmpeg Replace or suppress deprecated usages 2024-01-26 10:06:18 -08:00
decoder_flac Rollback of 8e2869278c 2024-02-15 02:35:12 -08:00
decoder_midi Add missing module registrations 2024-05-23 04:50:01 -07:00
decoder_opus Rollback of 8e2869278c 2024-02-15 02:35:12 -08:00
decoder_vp9 Rollback of 8e2869278c 2024-02-15 02:35:12 -08:00
effect Remove useHdr from overlaySettings 2024-06-12 02:52:36 -07:00
exoplayer Fix single sample handling ProgressiveMediaPeriod when disabling tracks 2024-06-12 10:08:10 -07:00
exoplayer_dash Remove deprecated DashMediaSource.DEFAULT_LIVE_PRESENTATION_DELAY_MS 2024-05-24 07:11:39 -07:00
exoplayer_hls Remove unnecessary throws Exception from HlsChunkSourceTest 2024-06-05 09:35:53 -07:00
exoplayer_ima Remove Bundleable type & Bundleable.Creator<Foo> CREATOR fields 2024-06-11 08:05:32 -07:00
exoplayer_rtsp Remove /* package */ comment from public classes 2024-05-15 05:23:30 -07:00
exoplayer_smoothstreaming Default to parse subtitles while extracting, instead of while rendering 2024-05-16 01:42:56 -07:00
exoplayer_workmanager Remove exoplayer2-only javadoc machinery from media3 2023-06-05 09:47:58 +00:00
extractor Add helper function in Track.java to copy track without edit lists. 2024-06-10 15:19:29 -07:00
muxer Split muxer android tests between parameterized and non parameterized 2024-06-12 09:29:22 -07:00
session Sync and map fatal and non-fatal errors from and to the legacy session 2024-06-12 06:26:00 -07:00
test_data Support upscaling with LanczosResample 2024-06-10 03:01:11 -07:00
test_exoplayer_playback Suppress incorrect linter error in DebugRenderersFactory method 2024-05-30 07:05:27 -07:00
test_session_common Sync and map fatal and non-fatal errors from and to the legacy session 2024-06-12 06:26:00 -07:00
test_session_current Sync and map fatal and non-fatal errors from and to the legacy session 2024-06-12 06:26:00 -07:00
test_utils Make ImageOutput clearable 2024-06-12 04:03:32 -07:00
test_utils_robolectric Increase h.264 buffer size in ShadowMediaCodecConfig 2024-05-30 03:57:35 -07:00
transformer Refactors the seek test and add more test cases 2024-06-12 06:34:43 -07:00
ui Add image samples and track selection to demo app 2024-06-12 08:02:52 -07:00
ui_leanback Bump effect and leanback minSdk to 19 2024-01-10 07:22:00 -08:00
lint.xml Update recommended way to suppress @UnstableApi errors in lint.xml 2023-11-15 02:34:40 -08:00