-
Notifications
You must be signed in to change notification settings - Fork 413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cmcd.Factory causes exception upon track change #888
Labels
Comments
copybara-service bot
pushed a commit
that referenced
this issue
Dec 15, 2023
When track is changed during playback, `playbackPositionUs` may be in middle of a chunk and `loadPositionUs` should be the start of that chunk. In this situation `loadPositionUs` can be less than the current `playbackPositionUs`, resulting into negative `bufferedDurationUs`. It translates to having no buffer and hence we should send `0` for `bufferedDurationUs` when creating new instances of `CmcdData.Factory`. Issue: #888 #minor-release PiperOrigin-RevId: 591099785
Thanks for reporting the issue. A fix was submitted to the |
copybara-service bot
pushed a commit
to google/ExoPlayer
that referenced
this issue
Dec 15, 2023
When track is changed during playback, `playbackPositionUs` may be in middle of a chunk and `loadPositionUs` should be the start of that chunk. In this situation `loadPositionUs` can be less than the current `playbackPositionUs`, resulting into negative `bufferedDurationUs`. It translates to having no buffer and hence we should send `0` for `bufferedDurationUs` when creating new instances of `CmcdData.Factory`. Issue: androidx/media#888 #minor-release PiperOrigin-RevId: 591099785
microkatz
pushed a commit
that referenced
this issue
Jan 11, 2024
When track is changed during playback, `playbackPositionUs` may be in middle of a chunk and `loadPositionUs` should be the start of that chunk. In this situation `loadPositionUs` can be less than the current `playbackPositionUs`, resulting into negative `bufferedDurationUs`. It translates to having no buffer and hence we should send `0` for `bufferedDurationUs` when creating new instances of `CmcdData.Factory`. Issue: #888 #minor-release PiperOrigin-RevId: 591099785 (cherry picked from commit 7f6596b)
@rohitjoins Thank you for addressing the issue. When can we expect the availability of this fix in the upcoming release? |
@akhilesh-dubey, we are doing a bug-fix release this week which will also include the fix for this issue. |
The fix is in the release branch. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Version
Media3 1.2.0
More version details
Following the release of
androidx.media3
v1.2.0 we tried to enable the CMCD with the default configuration viaMediaSource.Factory#setCmcdConfigurationFactory(CmcdConfiguration.Factory.DEFAULT)
. While it seems to work during regular playback, a crash occurs once a different track (e.g. Audio track) is selected via the UI. Following the stacktrace:The reason for this seems to be a negative
bufferedDurationUs
that is passed to theCmcdData.Factory
and I assume the reason for this crash cannot be fixed by the client.Other than that: The issue can be reproduced with the demo app once CMCD is enabled. Version
1.1.x
does have the same issue.Devices that reproduce the issue
Reproducable on all physical devices and emulators I tested it on
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
Pre-requisite: Set CMCD configuration during setup of
MediaSourceFactory
, e.g. add the following lineto the end of the setup within
PlayerActivity#createMediaSourceFactory
.Expected result
Playback continues/starts with selected track
Actual result
"Playback failed" is displayed. Clicking on "Play" button starts/resumes playback with selected track
Media
https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears.mpd
Bug Report
adb bugreport
to [email protected] after filing this issue.The text was updated successfully, but these errors were encountered: