Skip to content

ExoPlayer throw exception on loading attached H.265 ts file #303

Description

@pengbins

Media3 Version

ExoPlayer 2.18.5

Devices that reproduce the issue

  • pixel4 running on Android 12
  • maybe any other devices

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps

  1. play attached h265_playback_failed.ts file in demo

Expected result

The media file should plays successfully.

Actual result

  1. Toast "Playback failed" message on screen
  2. Check logcat:
com.google.android.exoplayer2.demo   E  Unexpected exception loading stream
  java.lang.IllegalStateException
    at com.google.android.exoplayer2.util.Assertions.checkState(Assertions.java:84)
    at com.google.android.exoplayer2.util.ParsableNalUnitBitArray.assertValidOffset(ParsableNalUnitBitArray.java:209)
    at com.google.android.exoplayer2.util.ParsableNalUnitBitArray.skipBit(ParsableNalUnitBitArray.java:65)
    at com.google.android.exoplayer2.util.ParsableNalUnitBitArray.readBit(ParsableNalUnitBitArray.java:125)
    at com.google.android.exoplayer2.util.ParsableNalUnitBitArray.readExpGolombCodeNum(ParsableNalUnitBitArray.java:193)
    at com.google.android.exoplayer2.util.ParsableNalUnitBitArray.readUnsignedExpGolombCodedInt(ParsableNalUnitBitArray.java:178)
    at com.google.android.exoplayer2.extractor.ts.H265Reader.skipShortTermRefPicSets(H265Reader.java:450)
    at com.google.android.exoplayer2.extractor.ts.H265Reader.parseMediaFormat(H265Reader.java:327)
    at com.google.android.exoplayer2.extractor.ts.H265Reader.endNalUnit(H265Reader.java:214)
    at com.google.android.exoplayer2.extractor.ts.H265Reader.consume(H265Reader.java:164)
    at com.google.android.exoplayer2.extractor.ts.PesReader.consume(PesReader.java:144)
    at com.google.android.exoplayer2.extractor.ts.TsExtractor.read(TsExtractor.java:386)
    at com.google.android.exoplayer2.source.BundledExtractorsAdapter.read(BundledExtractorsAdapter.java:127)
    at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1039)
    at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:412)
    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:920)

Media

h265_playback_failed.zip

Bug Report

  • You will email the zip file produced by adb bugreport to [email protected] after filing this issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions