-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
For certain playlist contents, the error above appears 100% (once it did not appear, but maybe I did something different - I did tens of tests to simplify procedure to reproduce)
Tested on Samsung S3 international, current version from dev-v2: da9c10a .
The playlist content should be:
1.audio only
2. video only
3. audio only
4. video only
For example, add the following playlist to media.exolist.json. Then run the code, select the playlist. I usually skip to the last 5-10 seconds of first 2 media by pressing on seekbar (NOT button for next)
{
"name": "Bug",
"playlist": [
{
"uri": "http://storage.googleapis.com/exoplayer-test-media-0/play.mp3"
},
{
"uri": "https://storage.googleapis.com/exoplayer-test-media-1/gen-3/screens/dash-vod-single-segment/video-avc-baseline-480.mp4"
},
{
"uri": "http://storage.googleapis.com/exoplayer-test-media-0/play.mp3"
},
{
"uri": "https://storage.googleapis.com/exoplayer-test-media-1/gen-3/screens/dash-vod-single-segment/video-avc-baseline-480.mp4"
}
]
}
It is not important that the first two files are the same with the next ones.
It is important that first one has audio only, second video only, third audio only and fourth video only.
In my case it appeared while using a custom renderer (which was rendering from a SingleSampleMediaSource/Period) which was rendering custom content, no audio/video, followed by regular video+audio, followed again by my custom content. It seems to me that situations where renderers are changed across periods are not correctly handled.
If you cannot reproduce it, I'll attach a bug report. Here is the full exception, it should appear after third media:
E/ExoPlayerImplInternal: Internal runtime error.
java.lang.IllegalStateException
at com.google.android.exoplayer2.util.Assertions.checkState(Assertions.java:79)
at com.google.android.exoplayer2.BaseRenderer.replaceStream(BaseRenderer.java:92)
at com.google.android.exoplayer2.BaseRenderer.enable(BaseRenderer.java:78)
at com.google.android.exoplayer2.ExoPlayerImplInternal.enableRenderers(ExoPlayerImplInternal.java:1371)
at com.google.android.exoplayer2.ExoPlayerImplInternal.setPlayingPeriodHolder(ExoPlayerImplInternal.java:1348)
at com.google.android.exoplayer2.ExoPlayerImplInternal.updatePeriods(ExoPlayerImplInternal.java:1133)
at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:462)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:315)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:176)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.google.android.exoplayer2.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)