From a79084b0a5782dce140ef6c2efcd3d2068295d25 Mon Sep 17 00:00:00 2001 From: edde746 <86283021+edde746@users.noreply.github.com> Date: Mon, 17 Aug 2026 04:46:25 +0200 Subject: [PATCH] chore(player): link upstream issue androidx/media#3377 in seek workaround --- .../plezy/exoplayer/MatroskaLateTracksSeekDeviceTest.kt | 9 +++++---- .../plezy/exoplayer/CuelessSeekExtractorWrapper.kt | 2 +- .../edde746/plezy/exoplayer/MatroskaLateTracksTest.kt | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/android/app/src/androidTest/kotlin/com/edde746/plezy/exoplayer/MatroskaLateTracksSeekDeviceTest.kt b/android/app/src/androidTest/kotlin/com/edde746/plezy/exoplayer/MatroskaLateTracksSeekDeviceTest.kt index 76debfe85..070ad98be 100644 --- a/android/app/src/androidTest/kotlin/com/edde746/plezy/exoplayer/MatroskaLateTracksSeekDeviceTest.kt +++ b/android/app/src/androidTest/kotlin/com/edde746/plezy/exoplayer/MatroskaLateTracksSeekDeviceTest.kt @@ -30,10 +30,11 @@ import org.junit.Test * * media3 1.11.0 builds the Matroska seek map at the end of the Cues element, which for these files * is before the Tracks element parsed, so the map permanently reports unseekable and ExoPlayer - * coerces every seek to t=0 (ProgressiveMediaPeriod). The first test is a canary asserting the - * upstream defect against a stock MatroskaExtractor — when it fails after a media3 upgrade, the - * TrackAwareSeekMap repair in [CuelessSeekExtractorWrapper] can be retired. The second test drives - * the production wrapper stack and requires the seek to actually land. + * coerces every seek to t=0 (ProgressiveMediaPeriod; tracking issue androidx/media #3377). The + * first test is a canary asserting the upstream defect against a stock MatroskaExtractor — when it + * fails after a media3 upgrade, the TrackAwareSeekMap repair in [CuelessSeekExtractorWrapper] can + * be retired. The second test drives the production wrapper stack and requires the seek to + * actually land. */ class MatroskaLateTracksSeekDeviceTest { private companion object { diff --git a/android/app/src/main/kotlin/com/edde746/plezy/exoplayer/CuelessSeekExtractorWrapper.kt b/android/app/src/main/kotlin/com/edde746/plezy/exoplayer/CuelessSeekExtractorWrapper.kt index accb78f53..bc9bfbc09 100644 --- a/android/app/src/main/kotlin/com/edde746/plezy/exoplayer/CuelessSeekExtractorWrapper.kt +++ b/android/app/src/main/kotlin/com/edde746/plezy/exoplayer/CuelessSeekExtractorWrapper.kt @@ -192,7 +192,7 @@ class CuelessSeekExtractorWrapper( * Routes seeks through [TrackAwareSeekMap]'s per-track cue lookups when the delegate reports * unseekable overall. The per-track queries read the live cue data (populated once the Cues * element parsed), so they resolve correctly even when the map was constructed before the - * Tracks element — the media3 1.11.0 tracks-after-clusters case. + * Tracks element — the media3 1.11.0 tracks-after-clusters case (androidx/media #3377). */ private inner class TrackCueSeekMap( private val delegate: TrackAwareSeekMap diff --git a/android/app/src/test/kotlin/com/edde746/plezy/exoplayer/MatroskaLateTracksTest.kt b/android/app/src/test/kotlin/com/edde746/plezy/exoplayer/MatroskaLateTracksTest.kt index d07576934..b578a8a7d 100644 --- a/android/app/src/test/kotlin/com/edde746/plezy/exoplayer/MatroskaLateTracksTest.kt +++ b/android/app/src/test/kotlin/com/edde746/plezy/exoplayer/MatroskaLateTracksTest.kt @@ -111,7 +111,8 @@ class MatroskaLateTracksTest { /** * media3 1.11.0 builds the Matroska seek map at the end of the Cues element, which for * tracks-after-clusters files is before the Tracks element parsed — the map then permanently - * reports unseekable and resolves every seek to byte 0, snapping playback to the start (#1969). + * reports unseekable and resolves every seek to byte 0, snapping playback to the start + * (#1969; upstream androidx/media #3377). * The production stack must repair it through the per-track cue lookups. */ @Test