Closed
Description
openedon Nov 9, 2021
I'm migrating to TrackSelectionOverrides
for "track" selection in ExoPlayer 2.16.0. I'm using it with TrackSelectionParameters
and it seems to be working (I set the overrides when Player.STATE_READY
).
...
TrackSelectionParameters.Builder trackSelectionParametersBuilder = new TrackSelectionParameters.Builder(this)
.setTrackSelectionOverrides(overridesBuilder.build());
player.setTrackSelectionParameters(trackSelectionParametersBuilder.build());
However when overrides get set for a media file utilizing multiple audio renderers (the default one as well as ffmpeg; for example file containing AC3 & TrueHD or AC3 & MP2), I receive following error:
E/ExoPlayerImplInternal: Playback error
com.google.android.exoplayer2.ExoPlaybackException: Unexpected runtime error
at com.google.android.exoplayer2.DefaultMediaClock.onRendererEnabled(DefaultMediaClock.java:96)
at com.google.android.exoplayer2.ExoPlayerImplInternal.enableRenderer(ExoPlayerImplInternal.java:2454)
at com.google.android.exoplayer2.ExoPlayerImplInternal.enableRenderers(ExoPlayerImplInternal.java:2402)
at com.google.android.exoplayer2.ExoPlayerImplInternal.reselectTracksInternal(ExoPlayerImplInternal.java:1709)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:511)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:214)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.lang.IllegalStateException: Multiple renderer media clocks enabled.
at com.google.android.exoplayer2.DefaultMediaClock.onRendererEnabled(DefaultMediaClock.java:96)
at com.google.android.exoplayer2.ExoPlayerImplInternal.enableRenderer(ExoPlayerImplInternal.java:2454)
at com.google.android.exoplayer2.ExoPlayerImplInternal.enableRenderers(ExoPlayerImplInternal.java:2402)
at com.google.android.exoplayer2.ExoPlayerImplInternal.reselectTracksInternal(ExoPlayerImplInternal.java:1709)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:511)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:214)
at android.os.HandlerThread.run(HandlerThread.java:67)
- ExoPlayer version number: 2.16.0 with applied patch eb678a7
- Android version: Android 10
- Android device: OnePlus 7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment