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

Playback failure when playing ogg file #2782

Closed
AOrobator opened this issue May 7, 2017 · 2 comments
Closed

Playback failure when playing ogg file #2782

AOrobator opened this issue May 7, 2017 · 2 comments
Assignees
Labels

Comments

@AOrobator
Copy link
Contributor

AOrobator commented May 7, 2017

On version 2.4.0, when I play a certain ogg file, I get a crash and it's 100% reproducible. I've attached the file that causes the issue. VLC player for Mac is able to play this file without issue.
Say My Name (feat. Zyra).ogg.zip

To reproduce this issue, place the file in /sdcard/Music/ then go into PlayerActivity.java of the ExoPlayer sample app and replace the implementation of buildMediaSource() with

private MediaSource buildMediaSource(Uri uri, String overrideExtension) {

    File sayMyNameFile = new File("/sdcard/Music/Say My Name (feat. Zyra).ogg");

    Uri sayMyNameUri = Uri.fromFile(sayMyNameFile);

    final MediaSource mediaSource = new ExtractorMediaSource(sayMyNameUri,
        new DefaultDataSourceFactory(this, "."), new DefaultExtractorsFactory(),
        mainHandler, eventLogger);

    return mediaSource;
  }

Add the following permission to the AndroidManifest.xml

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

Then run the following shell command to grant the read storage permission

adb shell pm grant com.google.android.exoplayer2.demo android.permission.READ_EXTERNAL_STORAGE

You can now click on any format in the app to reproduce the error

Unexpected exception loading stream
java.lang.ArrayIndexOutOfBoundsException: length=65025; regionStart=65025; regionLength=65025
    at java.util.Arrays.checkOffsetAndCount(Arrays.java:4857)
    at libcore.io.IoBridge.read(IoBridge.java:466)
    at java.io.RandomAccessFile.readBytes(RandomAccessFile.java:325)
    at java.io.RandomAccessFile.read(RandomAccessFile.java:354)
    at com.google.android.exoplayer2.upstream.FileDataSource.read(FileDataSource.java:90)
    at com.google.android.exoplayer2.upstream.DefaultDataSource.read(DefaultDataSource.java:128)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFromDataSource(DefaultExtractorInput.java:257)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFully(DefaultExtractorInput.java:70)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFully(DefaultExtractorInput.java:79)
    at com.google.android.exoplayer2.extractor.ogg.OggPacket.populate(OggPacket.java:88)
    at com.google.android.exoplayer2.extractor.ogg.StreamReader.readHeaders(StreamReader.java:124)
    at com.google.android.exoplayer2.extractor.ogg.StreamReader.read(StreamReader.java:105)
    at com.google.android.exoplayer2.extractor.ogg.OggExtractor.read(OggExtractor.java:98)
    at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:652)
    at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:295)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
    at java.lang.Thread.run(Thread.java:761)
E/LoadTask: Unexpected exception loading stream
java.lang.ArrayIndexOutOfBoundsException: length=65025; regionStart=65025; regionLength=65025
    at java.util.Arrays.checkOffsetAndCount(Arrays.java:4857)
    at libcore.io.IoBridge.read(IoBridge.java:466)
    at java.io.RandomAccessFile.readBytes(RandomAccessFile.java:325)
    at java.io.RandomAccessFile.read(RandomAccessFile.java:354)
    at com.google.android.exoplayer2.upstream.FileDataSource.read(FileDataSource.java:90)
    at com.google.android.exoplayer2.upstream.DefaultDataSource.read(DefaultDataSource.java:128)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFromDataSource(DefaultExtractorInput.java:257)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFully(DefaultExtractorInput.java:70)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFully(DefaultExtractorInput.java:79)
    at com.google.android.exoplayer2.extractor.ogg.OggPacket.populate(OggPacket.java:88)
    at com.google.android.exoplayer2.extractor.ogg.StreamReader.readHeaders(StreamReader.java:124)
    at com.google.android.exoplayer2.extractor.ogg.StreamReader.read(StreamReader.java:105)
    at com.google.android.exoplayer2.extractor.ogg.OggExtractor.read(OggExtractor.java:98)
    at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:652)
    at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:295)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
    at java.lang.Thread.run(Thread.java:761)
E/EventLogger: internalError [0.14, loadError]
com.google.android.exoplayer2.upstream.Loader$UnexpectedLoaderException: Unexpected ArrayIndexOutOfBoundsException: length=65025; regionStart=65025; regionLength=65025
    at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:317)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
    at java.lang.Thread.run(Thread.java:761)
 Caused by: java.lang.ArrayIndexOutOfBoundsException: length=65025; regionStart=65025; regionLength=65025
    at java.util.Arrays.checkOffsetAndCount(Arrays.java:4857)
    at libcore.io.IoBridge.read(IoBridge.java:466)
    at java.io.RandomAccessFile.readBytes(RandomAccessFile.java:325)
    at java.io.RandomAccessFile.read(RandomAccessFile.java:354)
    at com.google.android.exoplayer2.upstream.FileDataSource.read(FileDataSource.java:90)
    at com.google.android.exoplayer2.upstream.DefaultDataSource.read(DefaultDataSource.java:128)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFromDataSource(DefaultExtractorInput.java:257)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFully(DefaultExtractorInput.java:70)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFully(DefaultExtractorInput.java:79)
    at com.google.android.exoplayer2.extractor.ogg.OggPacket.populate(OggPacket.java:88)
    at com.google.android.exoplayer2.extractor.ogg.StreamReader.readHeaders(StreamReader.java:124)
    at com.google.android.exoplayer2.extractor.ogg.StreamReader.read(StreamReader.java:105)
    at com.google.android.exoplayer2.extractor.ogg.OggExtractor.read(OggExtractor.java:98)
    at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:652)
    at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:295)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
    at java.lang.Thread.run(Thread.java:761) 
E/EventLogger: internalError [0.14, loadError]
com.google.android.exoplayer2.upstream.Loader$UnexpectedLoaderException: Unexpected ArrayIndexOutOfBoundsException: length=65025; regionStart=65025; regionLength=65025
    at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:317)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
    at java.lang.Thread.run(Thread.java:761)
 Caused by: java.lang.ArrayIndexOutOfBoundsException: length=65025; regionStart=65025; regionLength=65025
    at java.util.Arrays.checkOffsetAndCount(Arrays.java:4857)
    at libcore.io.IoBridge.read(IoBridge.java:466)
    at java.io.RandomAccessFile.readBytes(RandomAccessFile.java:325)
    at java.io.RandomAccessFile.read(RandomAccessFile.java:354)
    at com.google.android.exoplayer2.upstream.FileDataSource.read(FileDataSource.java:90)
    at com.google.android.exoplayer2.upstream.DefaultDataSource.read(DefaultDataSource.java:128)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFromDataSource(DefaultExtractorInput.java:257)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFully(DefaultExtractorInput.java:70)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFully(DefaultExtractorInput.java:79)
    at com.google.android.exoplayer2.extractor.ogg.OggPacket.populate(OggPacket.java:88)
    at com.google.android.exoplayer2.extractor.ogg.StreamReader.readHeaders(StreamReader.java:124)
    at com.google.android.exoplayer2.extractor.ogg.StreamReader.read(StreamReader.java:105)
    at com.google.android.exoplayer2.extractor.ogg.OggExtractor.read(OggExtractor.java:98)
    at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:652)
    at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:295)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
    at java.lang.Thread.run(Thread.java:761) 
E/LoadTask: Unexpected exception loading stream
java.lang.ArrayIndexOutOfBoundsException: length=65025; regionStart=65025; regionLength=65025
    at java.util.Arrays.checkOffsetAndCount(Arrays.java:4857)
    at libcore.io.IoBridge.read(IoBridge.java:466)
    at java.io.RandomAccessFile.readBytes(RandomAccessFile.java:325)
    at java.io.RandomAccessFile.read(RandomAccessFile.java:354)
    at com.google.android.exoplayer2.upstream.FileDataSource.read(FileDataSource.java:90)
    at com.google.android.exoplayer2.upstream.DefaultDataSource.read(DefaultDataSource.java:128)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFromDataSource(DefaultExtractorInput.java:257)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFully(DefaultExtractorInput.java:70)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFully(DefaultExtractorInput.java:79)
    at com.google.android.exoplayer2.extractor.ogg.OggPacket.populate(OggPacket.java:88)
    at com.google.android.exoplayer2.extractor.ogg.StreamReader.readHeaders(StreamReader.java:124)
    at com.google.android.exoplayer2.extractor.ogg.StreamReader.read(StreamReader.java:105)
    at com.google.android.exoplayer2.extractor.ogg.OggExtractor.read(OggExtractor.java:98)
    at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:652)
    at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:295)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
    at java.lang.Thread.run(Thread.java:761)
E/EventLogger: internalError [1.13, loadError]
com.google.android.exoplayer2.upstream.Loader$UnexpectedLoaderException: Unexpected ArrayIndexOutOfBoundsException: length=65025; regionStart=65025; regionLength=65025
    at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:317)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
    at java.lang.Thread.run(Thread.java:761)
 Caused by: java.lang.ArrayIndexOutOfBoundsException: length=65025; regionStart=65025; regionLength=65025
    at java.util.Arrays.checkOffsetAndCount(Arrays.java:4857)
    at libcore.io.IoBridge.read(IoBridge.java:466)
    at java.io.RandomAccessFile.readBytes(RandomAccessFile.java:325)
    at java.io.RandomAccessFile.read(RandomAccessFile.java:354)
    at com.google.android.exoplayer2.upstream.FileDataSource.read(FileDataSource.java:90)
    at com.google.android.exoplayer2.upstream.DefaultDataSource.read(DefaultDataSource.java:128)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFromDataSource(DefaultExtractorInput.java:257)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFully(DefaultExtractorInput.java:70)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFully(DefaultExtractorInput.java:79)
    at com.google.android.exoplayer2.extractor.ogg.OggPacket.populate(OggPacket.java:88)
    at com.google.android.exoplayer2.extractor.ogg.StreamReader.readHeaders(StreamReader.java:124)
    at com.google.android.exoplayer2.extractor.ogg.StreamReader.read(StreamReader.java:105)
    at com.google.android.exoplayer2.extractor.ogg.OggExtractor.read(OggExtractor.java:98)
    at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:652)
    at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:295)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
    at java.lang.Thread.run(Thread.java:761) 
E/LoadTask: Unexpected exception loading stream
java.lang.ArrayIndexOutOfBoundsException: length=65025; regionStart=65025; regionLength=65025
    at java.util.Arrays.checkOffsetAndCount(Arrays.java:4857)
    at libcore.io.IoBridge.read(IoBridge.java:466)
    at java.io.RandomAccessFile.readBytes(RandomAccessFile.java:325)
    at java.io.RandomAccessFile.read(RandomAccessFile.java:354)
    at com.google.android.exoplayer2.upstream.FileDataSource.read(FileDataSource.java:90)
    at com.google.android.exoplayer2.upstream.DefaultDataSource.read(DefaultDataSource.java:128)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFromDataSource(DefaultExtractorInput.java:257)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFully(DefaultExtractorInput.java:70)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFully(DefaultExtractorInput.java:79)
    at com.google.android.exoplayer2.extractor.ogg.OggPacket.populate(OggPacket.java:88)
    at com.google.android.exoplayer2.extractor.ogg.StreamReader.readHeaders(StreamReader.java:124)
    at com.google.android.exoplayer2.extractor.ogg.StreamReader.read(StreamReader.java:105)
    at com.google.android.exoplayer2.extractor.ogg.OggExtractor.read(OggExtractor.java:98)
    at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:652)
    at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:295)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
    at java.lang.Thread.run(Thread.java:761)
05-07 20:21:49.206 14785-14785/com.google.android.exoplayer2.demo E/EventLogger: internalError [3.14, loadError]
 com.google.android.exoplayer2.upstream.Loader$UnexpectedLoaderException: Unexpected ArrayIndexOutOfBoundsException: length=65025; regionStart=65025; regionLength=65025
     at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:317)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
     at java.lang.Thread.run(Thread.java:761)
  Caused by: java.lang.ArrayIndexOutOfBoundsException: length=65025; regionStart=65025; regionLength=65025
     at java.util.Arrays.checkOffsetAndCount(Arrays.java:4857)
     at libcore.io.IoBridge.read(IoBridge.java:466)
     at java.io.RandomAccessFile.readBytes(RandomAccessFile.java:325)
     at java.io.RandomAccessFile.read(RandomAccessFile.java:354)
     at com.google.android.exoplayer2.upstream.FileDataSource.read(FileDataSource.java:90)
     at com.google.android.exoplayer2.upstream.DefaultDataSource.read(DefaultDataSource.java:128)
     at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFromDataSource(DefaultExtractorInput.java:257)
     at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFully(DefaultExtractorInput.java:70)
     at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFully(DefaultExtractorInput.java:79)
     at com.google.android.exoplayer2.extractor.ogg.OggPacket.populate(OggPacket.java:88)
     at com.google.android.exoplayer2.extractor.ogg.StreamReader.readHeaders(StreamReader.java:124)
     at com.google.android.exoplayer2.extractor.ogg.StreamReader.read(StreamReader.java:105)
     at com.google.android.exoplayer2.extractor.ogg.OggExtractor.read(OggExtractor.java:98)
     at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:652)
     at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:295)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
     at java.lang.Thread.run(Thread.java:761) 
E/ExoPlayerImplInternal: Source error.
com.google.android.exoplayer2.upstream.Loader$UnexpectedLoaderException: Unexpected ArrayIndexOutOfBoundsException: length=65025; regionStart=65025; regionLength=65025
    at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:317)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
    at java.lang.Thread.run(Thread.java:761)
 Caused by: java.lang.ArrayIndexOutOfBoundsException: length=65025; regionStart=65025; regionLength=65025
    at java.util.Arrays.checkOffsetAndCount(Arrays.java:4857)
    at libcore.io.IoBridge.read(IoBridge.java:466)
    at java.io.RandomAccessFile.readBytes(RandomAccessFile.java:325)
    at java.io.RandomAccessFile.read(RandomAccessFile.java:354)
    at com.google.android.exoplayer2.upstream.FileDataSource.read(FileDataSource.java:90)
    at com.google.android.exoplayer2.upstream.DefaultDataSource.read(DefaultDataSource.java:128)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFromDataSource(DefaultExtractorInput.java:257)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFully(DefaultExtractorInput.java:70)
    at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFully(DefaultExtractorInput.java:79)
    at com.google.android.exoplayer2.extractor.ogg.OggPacket.populate(OggPacket.java:88)
    at com.google.android.exoplayer2.extractor.ogg.StreamReader.readHeaders(StreamReader.java:124)
    at com.google.android.exoplayer2.extractor.ogg.StreamReader.read(StreamReader.java:105)
    at com.google.android.exoplayer2.extractor.ogg.OggExtractor.read(OggExtractor.java:98)
    at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:652)
    at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:295)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
    at java.lang.Thread.run(Thread.java:761) 
E/EventLogger: playerFailed [3.15]
 com.google.android.exoplayer2.ExoPlaybackException
     at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:357)
     at android.os.Handler.dispatchMessage(Handler.java:98)
     at android.os.Looper.loop(Looper.java:154)
     at android.os.HandlerThread.run(HandlerThread.java:61)
  Caused by: com.google.android.exoplayer2.upstream.Loader$UnexpectedLoaderException: Unexpected ArrayIndexOutOfBoundsException: length=65025; regionStart=65025; regionLength=65025
     at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:317)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
     at java.lang.Thread.run(Thread.java:761)
  Caused by: java.lang.ArrayIndexOutOfBoundsException: length=65025; regionStart=65025; regionLength=65025
     at java.util.Arrays.checkOffsetAndCount(Arrays.java:4857)
     at libcore.io.IoBridge.read(IoBridge.java:466)
     at java.io.RandomAccessFile.readBytes(RandomAccessFile.java:325)
     at java.io.RandomAccessFile.read(RandomAccessFile.java:354)
     at com.google.android.exoplayer2.upstream.FileDataSource.read(FileDataSource.java:90)
     at com.google.android.exoplayer2.upstream.DefaultDataSource.read(DefaultDataSource.java:128)
     at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFromDataSource(DefaultExtractorInput.java:257)
     at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFully(DefaultExtractorInput.java:70)
     at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFully(DefaultExtractorInput.java:79)
     at com.google.android.exoplayer2.extractor.ogg.OggPacket.populate(OggPacket.java:88)
     at com.google.android.exoplayer2.extractor.ogg.StreamReader.readHeaders(StreamReader.java:124)
     at com.google.android.exoplayer2.extractor.ogg.StreamReader.read(StreamReader.java:105)
     at com.google.android.exoplayer2.extractor.ogg.OggExtractor.read(OggExtractor.java:98)
     at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:652)
     at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:295)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
     at java.lang.Thread.run(Thread.java:761) 
05-07 20:21:49.219 14785-14785/com.google.android.exoplayer2.demo D/EventLogger: loading [false]
05-07 20:21:49.243 14785-14785/com.google.android.exoplayer2.demo D/EventLogger: state [3.18, true, I]
@ojw28
Copy link
Contributor

ojw28 commented May 8, 2017

@marcbaechinger - Could you take a look at this? It looks like OggPacket.packetArray is too small, and simply resizing it to fit what's being read fixes the problem. I'm not sure what the implications are though.

Are some of the assumptions in the parsing logic incorrect? MAX_PAGE_PAYLOAD is used as the size of packetArray, but also elsewhere, for example in VorbisReader when the format is instantiated.

@ojw28 ojw28 changed the title Crash when playing ogg file Playback failure when playing ogg file May 8, 2017
@marcbaechinger
Copy link
Contributor

Yes, exactly. There is one huge packet at the start of the ogg stream (383238 bytes). Ogg packets have no size limit per spec. So this is valid. I look into this. Thanks.

ojw28 pushed a commit that referenced this issue May 17, 2017
… exceeds

the current size.

#2782

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156018137
@ojw28 ojw28 closed this as completed May 22, 2017
ojw28 pushed a commit that referenced this issue May 23, 2017
… exceeds

the current size.

#2782

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156018137
@google google locked and limited conversation to collaborators Sep 20, 2017
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