Closed
Description
Issue description
While playing a problem TS chunk player gets error and stop playing.
With this chunk it always happens near mediaPos=7.30.
It doesn't matter if the chunk is part of the HLS stream or is played separately.
FFPlay and VLC can play through this chunk (with short-term picture breaking).
E/EventLogger: playerFailed [eventTime=8.69, mediaPos=7.30, window=0, period=0
com.google.android.exoplayer2.ExoPlaybackException: Source error
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:554)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: com.google.android.exoplayer2.upstream.Loader$UnexpectedLoaderException: Unexpected IllegalStateException: null
at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:436)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.IllegalStateException
at com.google.android.exoplayer2.util.Assertions.checkState(Assertions.java:81)
at com.google.android.exoplayer2.util.NalUnitUtil.findNalUnit(NalUnitUtil.java:431)
at com.google.android.exoplayer2.extractor.ts.H264Reader.consume(H264Reader.java:136)
at com.google.android.exoplayer2.extractor.ts.PesReader.consume(PesReader.java:144)
at com.google.android.exoplayer2.extractor.ts.TsExtractor.read(TsExtractor.java:343)
at com.google.android.exoplayer2.source.BundledExtractorsAdapter.read(BundledExtractorsAdapter.java:127)
at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1046)
at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:415)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
]
Reproduction steps
This bug can be reproduced in the demo app with this media.exolist.json:
[
{
"name": "Problem",
"samples": [
{
"name": "138.ts",
"uri": "https://hivemind.rip/138.ts"
}
]
}
]
Link to test content
Link to problem chunk: https://hivemind.rip/138.ts
A full bug report captured from the device
https://hivemind.rip/report.zip
Version of ExoPlayer being used
2.12.0 from release-v2 branch
Device(s) and version(s) of Android being used
Bug can be reproduced stably on all devices available to me (Xiaomi Mi BOX,
Amazon Fire TV Stick 4k) and in the Android emulator (used Android TV (1080p) with 28 API level).