Skip to content
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

"Top bit not zero: -90000" on DASH content that works on other players #7207

Closed
tokou opened this issue Apr 8, 2020 · 3 comments
Closed
Assignees
Labels

Comments

@tokou
Copy link

tokou commented Apr 8, 2020

Issue description

The player throws an error IllegalStateException: Top bit not zero: -90000 when playing a certain video.

Reproduction steps

  • Play the linked URL through the ExoPlayer demo
  • Observe a "Playback failed" error
  • The video plays properly on VLC (File> Open network stream) and other players like JWPlayer 8
media.exolist.json
[
  {
    "name": "Custom",
    "samples": [
      {
        "name": "Bug",
        "uri": "http://51.91.154.98:1935/mediacache/_definst_/smil:cache0/5c376083c7bd33220c4c28ad/5e8dc57ef9a4a93a85167f87.smil/manifest.mpd"
      }
    ]
  }
]

Link to test content

http://51.91.154.98:1935/mediacache/_definst_/smil:cache0/5c376083c7bd33220c4c28ad/5e8dc57ef9a4a93a85167f87.smil/manifest.mpd

A full bug report captured from the device

Stacktrace
2020-04-08 16:10:32.993 6847-6847/com.google.android.exoplayer2.demo E/EventLogger: playerFailed [eventTime=1.08, mediaPos=0.00, window=0, period=0]
    com.google.android.exoplayer2.ExoPlaybackException: com.google.android.exoplayer2.upstream.Loader$UnexpectedLoaderException: Unexpected IllegalStateException: Top bit not zero: -90000
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:394)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:216)
        at android.os.HandlerThread.run(HandlerThread.java:67)
     Caused by: com.google.android.exoplayer2.upstream.Loader$UnexpectedLoaderException: Unexpected IllegalStateException: Top bit not zero: -90000
        at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:413)
        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:923)
     Caused by: java.lang.IllegalStateException: Top bit not zero: -90000
        at com.google.android.exoplayer2.util.ParsableByteArray.readUnsignedIntToInt(ParsableByteArray.java:397)
        at com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.parseTfhd(FragmentedMp4Extractor.java:876)
        at com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.parseTraf(FragmentedMp4Extractor.java:704)
        at com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.parseMoof(FragmentedMp4Extractor.java:693)
        at com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.onMoofContainerAtomRead(FragmentedMp4Extractor.java:542)
        at com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.onContainerAtomRead(FragmentedMp4Extractor.java:456)
        at com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.processAtomEnded(FragmentedMp4Extractor.java:434)
        at com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.readAtomPayload(FragmentedMp4Extractor.java:429)
        at com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.read(FragmentedMp4Extractor.java:315)
        at com.google.android.exoplayer2.source.chunk.ContainerMediaChunk.load(ContainerMediaChunk.java:135)
        at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:391)
        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:923) 

https://we.tl/t-s3wBcK2IsJ

Version of ExoPlayer being used

ExoPlayer Demo from the latest release (r2.11.3)
I added android:usesCleartextTraffic="true" in the <application> node in AndroidManifest.xml in order to make Android accept non HTTPS link (I am unable to provide an example on HTTPS for the moment)

Device(s) and version(s) of Android being used

Tested on the Android emulator API 30 and on various devices like Xiaomi Mi A1 (Android 9)

@tokou
Copy link
Author

tokou commented Apr 9, 2020

Closing for now because we reverted our server to Wowza 4.7 and I'm not able to provide a link that fails.
The error seems to happen when switching to Wowza 4.8

@tokou tokou closed this as completed Apr 9, 2020
@tokou
Copy link
Author

tokou commented Apr 9, 2020

I just fixed the description with a working link.

@tokou tokou reopened this Apr 9, 2020
@AquilesCanta
Copy link
Contributor

AquilesCanta commented Apr 13, 2020

default_sample_duration in the tfhd is 4294877296, but our FragmentedMp4Extractor forbids values with the most significant bit set (which yields values that in practice don't make much sense). The stream works, however, because every sample defines its own duration, so default_sample_duration is ignored. If the extractor is modified to not throw the exception for big values, content plays correctly.

From a quick look at the spec this, even though weird (the producer could just not put the value there, since it's not used/useful), seems valid. I'll check with my team and I'll reach back once we've decided what step to take next.

@AquilesCanta AquilesCanta self-assigned this Apr 13, 2020
icbaker pushed a commit that referenced this issue Apr 15, 2020
Allows playback of content when the default value is
not valid, but not used for any samples.

Issue: #7207
PiperOrigin-RevId: 306631376
@ojw28 ojw28 closed this as completed May 14, 2020
ojw28 pushed a commit that referenced this issue May 28, 2020
Allows playback of content when the default value is
not valid, but not used for any samples.

Issue: #7207
PiperOrigin-RevId: 306631376
@google google locked and limited conversation to collaborators Jul 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants