Skip to content

1.5.0 beta 1 MP4 change triggering bug #1819

Description

@Tolriq

Version

Media3 main branch

More version details

1.5.0 beta 1

Devices that reproduce the issue

All

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Not tested

Reproduction steps

Play a file that is being transcoded by ffmpeg to MP4/ALAC ("arguments=-hide_banner -i saf:40.wv -map 0:a -vn -c:a alac -f ismv -frag_duration 60 /storage/emulated/0/Android/data/app.symfonik.music.player.debug/cache/transcode/07D05E8E7001C5DF59C4163AE166A8652.mp4")

Expected result

The files plays at is was played in all previous versions.

Actual result

Extractor now fails with:

internalError [eventTime=159.58, mediaPos=0.00, window=0, period=0, loadError (Ask Gemini)
                                                                                                      androidx.media3.exoplayer.upstream.Loader$UnexpectedLoaderException: Unexpected IllegalStateException: Top bit not zero: -1
                                                                                                          at androidx.media3.exoplayer.upstream.Loader$LoadTask.run(Loader.java:471)
                                                                                                          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                                                                                                          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
                                                                                                          at java.lang.Thread.run(Thread.java:1012)
                                                                                                      Caused by: java.lang.IllegalStateException: Top bit not zero: -1
                                                                                                          at androidx.media3.common.util.ParsableByteArray.readUnsignedLongToLong(ParsableByteArray.java:440)
                                                                                                          at androidx.media3.extractor.mp4.BoxParser.parseMdhd(BoxParser.java:961)
                                                                                                          at androidx.media3.extractor.mp4.BoxParser.parseTrak(BoxParser.java:354)
                                                                                                          at androidx.media3.extractor.mp4.BoxParser.parseTraks(BoxParser.java:152)
                                                                                                          at androidx.media3.extractor.mp4.FragmentedMp4Extractor.onMoovContainerAtomRead(FragmentedMp4Extractor.java:678)
                                                                                                          at androidx.media3.extractor.mp4.FragmentedMp4Extractor.onContainerAtomRead(FragmentedMp4Extractor.java:648)
                                                                                                          at androidx.media3.extractor.mp4.FragmentedMp4Extractor.processAtomEnded(FragmentedMp4Extractor.java:628)
                                                                                                          at androidx.media3.extractor.mp4.FragmentedMp4Extractor.readAtomPayload(FragmentedMp4Extractor.java:623)
                                                                                                          at androidx.media3.extractor.mp4.FragmentedMp4Extractor.read(FragmentedMp4Extractor.java:500)
                                                                                                          at androidx.media3.exoplayer.source.BundledExtractorsAdapter.read(BundledExtractorsAdapter.java:147)
                                                                                                          at androidx.media3.exoplayer.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1122)
                                                                                                          at androidx.media3.exoplayer.upstream.Loader$LoadTask.run(Loader.java:450)
                                                                                                          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
                                                                                                          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) 
                                                                                                          at java.lang.Thread.run(Thread.java:1012) 

This is caused by ecb0024 that does not take in account the -1 value for those kind of media.

Media

See attached file, but maybe the issue is due to the file being created while the playback starts (So maybe needs to be accessed via a webserver without a content-size.

0C414CBDC52591C77E23E33F96E356AE3.zip

Bug Report

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions