google / ExoPlayer

This project is deprecated and stale. The latest ExoPlayer code is available in https://github.com/androidx/media
https://developer.android.com/media/media3/exoplayer
Apache License 2.0
21.74k stars 6.03k forks source link

Can't play this FLAC file despite OK in Chrome and VLC and flac command line. #3648

Closed yukuku closed 6 years ago

yukuku commented 6 years ago

Issue description

Cannot play the attached FLAC file with ExoPlayer FLAC extension already compiled (with the JNI). The file can be played in Chrome and VLC and can be decoded using the command line flac.

Reproduction steps

Upload the extracted attachment somewhere. Add an entry to the demo app:

      {
        "name": "FLACCCC 2",
        "uri": "https://cdn.glitch.com/687699a2-9e1f-4587-9f60-9f4cee5da66c%2Frecording-20171228-163208.flac?1514478825217"
      },

Link to test content

recording-20171228-163208.flac.zip

Version of ExoPlayer being used

2.6.0, checked out at 1b66908f7d79b6891d8d99705470797640457e72 (release-v2)

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

Official Android emulator API 25. It seems to be software issue, not tied to hardware media player.

A full bug report captured from the device

Relevant stack trace:

12-28 17:08:13.420 13641-13641/com.google.android.exoplayer2.demo I/DefaultRenderersFactory: Loaded LibvpxVideoRenderer.
12-28 17:08:13.421 13641-13641/com.google.android.exoplayer2.demo I/DefaultRenderersFactory: Loaded LibopusAudioRenderer.
12-28 17:08:13.421 13641-13641/com.google.android.exoplayer2.demo I/DefaultRenderersFactory: Loaded LibflacAudioRenderer.
12-28 17:08:13.421 13641-13641/com.google.android.exoplayer2.demo I/DefaultRenderersFactory: Loaded FfmpegAudioRenderer.
12-28 17:08:13.421 13641-13641/com.google.android.exoplayer2.demo I/ExoPlayerImpl: Init 3f63d73 [ExoPlayerLib/2.6.0] [generic_x86, Android SDK built for x86, Google, 25]
12-28 17:08:13.425 13641-13641/com.google.android.exoplayer2.demo D/EventLogger: state [0.00, true, I]
12-28 17:08:13.433 13641-13641/com.google.android.exoplayer2.demo D/EventLogger: state [0.01, true, B]
12-28 17:08:13.434 13641-13641/com.google.android.exoplayer2.demo D/EventLogger: sourceInfo [periodCount=1, windowCount=1
12-28 17:08:13.434 13641-13641/com.google.android.exoplayer2.demo D/EventLogger:   period [?]
12-28 17:08:13.434 13641-13641/com.google.android.exoplayer2.demo D/EventLogger:   window [?, false, false]
12-28 17:08:13.434 13641-13641/com.google.android.exoplayer2.demo D/EventLogger: ]
12-28 17:08:13.473 13641-13641/com.google.android.exoplayer2.demo D/EventLogger: loading [true]
12-28 17:08:13.483 13641-13661/com.google.android.exoplayer2.demo D/EGL_emulation: eglMakeCurrent: 0xa3e85420: ver 3 0 (tinfo 0xa3e83200)
12-28 17:08:13.498 13641-13661/com.google.android.exoplayer2.demo D/EGL_emulation: eglMakeCurrent: 0xa3e85420: ver 3 0 (tinfo 0xa3e83200)
12-28 17:08:13.515 13641-13661/com.google.android.exoplayer2.demo D/EGL_emulation: eglMakeCurrent: 0xa3e85420: ver 3 0 (tinfo 0xa3e83200)
12-28 17:08:13.544 13641-13661/com.google.android.exoplayer2.demo D/OpenGLRenderer: endAllActiveAnimators on 0x91c1fa00 (ExpandableListView) with handle 0x9f3089b0
12-28 17:08:13.803 13641-15032/com.google.android.exoplayer2.demo V/FLACParser: FLACParser::FLACParser
12-28 17:08:17.137 13641-13641/com.google.android.exoplayer2.demo D/EventLogger: sourceInfo [periodCount=1, windowCount=1
12-28 17:08:17.137 13641-13641/com.google.android.exoplayer2.demo D/EventLogger:   period [4.29]
12-28 17:08:17.138 13641-13641/com.google.android.exoplayer2.demo D/EventLogger:   window [4.29, false, false]
12-28 17:08:17.138 13641-13641/com.google.android.exoplayer2.demo D/EventLogger: ]
12-28 17:08:17.143 13641-13641/com.google.android.exoplayer2.demo D/EventLogger: Tracks [
12-28 17:08:17.143 13641-13641/com.google.android.exoplayer2.demo D/EventLogger:   Renderer:2 [
12-28 17:08:17.143 13641-13641/com.google.android.exoplayer2.demo D/EventLogger:     Group:0, adaptive_supported=N/A [
12-28 17:08:17.143 13641-13641/com.google.android.exoplayer2.demo D/EventLogger:       [X] Track:0, id=null, mimeType=audio/raw, bitrate=705600, channels=1, sample_rate=44100, supported=YES
12-28 17:08:17.143 13641-13641/com.google.android.exoplayer2.demo D/EventLogger:     ]
12-28 17:08:17.144 13641-13641/com.google.android.exoplayer2.demo D/EventLogger:   ]
12-28 17:08:17.144 13641-13641/com.google.android.exoplayer2.demo D/EventLogger: ]
12-28 17:08:17.144 13641-13641/com.google.android.exoplayer2.demo D/EventLogger: audioEnabled [3.72]
12-28 17:08:17.344 13641-15037/com.google.android.exoplayer2.demo I/OMXClient: MuxOMX ctor
12-28 17:08:17.360 13641-13641/com.google.android.exoplayer2.demo D/EventLogger: audioDecoderInitialized [3.94, OMX.google.raw.decoder]
12-28 17:08:17.360 13641-13641/com.google.android.exoplayer2.demo D/EventLogger: audioFormatChanged [3.94, id=null, mimeType=audio/raw, bitrate=705600, channels=1, sample_rate=44100]
12-28 17:08:21.907 13641-15031/com.google.android.exoplayer2.demo E/ExoPlayerImplInternal: Internal runtime error.
                                                                                           java.lang.IllegalStateException: Buffer too small (32768 < 131070)
                                                                                               at com.google.android.exoplayer2.decoder.DecoderInputBuffer.createReplacementByteBuffer(DecoderInputBuffer.java:160)
                                                                                               at com.google.android.exoplayer2.decoder.DecoderInputBuffer.ensureSpaceForWrite(DecoderInputBuffer.java:110)
                                                                                               at com.google.android.exoplayer2.source.SampleQueue.read(SampleQueue.java:318)
                                                                                               at com.google.android.exoplayer2.source.ExtractorMediaPeriod.readData(ExtractorMediaPeriod.java:376)
                                                                                               at com.google.android.exoplayer2.source.ExtractorMediaPeriod$SampleStreamImpl.readData(ExtractorMediaPeriod.java:641)
                                                                                               at com.google.android.exoplayer2.BaseRenderer.readSource(BaseRenderer.java:280)
                                                                                               at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:663)
                                                                                               at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:553)
                                                                                               at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:560)
                                                                                               at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:306)
                                                                                               at android.os.Handler.dispatchMessage(Handler.java:98)
                                                                                               at android.os.Looper.loop(Looper.java:154)
                                                                                               at android.os.HandlerThread.run(HandlerThread.java:61)
12-28 17:08:21.913 13641-13641/com.google.android.exoplayer2.demo E/EventLogger: playerFailed [8.49]
                                                                                 com.google.android.exoplayer2.ExoPlaybackException
                                                                                     at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:360)
                                                                                     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: java.lang.IllegalStateException: Buffer too small (32768 < 131070)
                                                                                     at com.google.android.exoplayer2.decoder.DecoderInputBuffer.createReplacementByteBuffer(DecoderInputBuffer.java:160)
                                                                                     at com.google.android.exoplayer2.decoder.DecoderInputBuffer.ensureSpaceForWrite(DecoderInputBuffer.java:110)
                                                                                     at com.google.android.exoplayer2.source.SampleQueue.read(SampleQueue.java:318)
                                                                                     at com.google.android.exoplayer2.source.ExtractorMediaPeriod.readData(ExtractorMediaPeriod.java:376)
                                                                                     at com.google.android.exoplayer2.source.ExtractorMediaPeriod$SampleStreamImpl.readData(ExtractorMediaPeriod.java:641)
                                                                                     at com.google.android.exoplayer2.BaseRenderer.readSource(BaseRenderer.java:280)
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:663)
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:553)
                                                                                     at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:560)
                                                                                     at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:306)
                                                                                     at android.os.Handler.dispatchMessage(Handler.java:98) 
                                                                                     at android.os.Looper.loop(Looper.java:154) 
                                                                                     at android.os.HandlerThread.run(HandlerThread.java:61) 
12-28 17:08:21.930 13641-13641/com.google.android.exoplayer2.demo D/EventLogger: audioDisabled [8.51]
12-28 17:08:21.941 13641-13641/com.google.android.exoplayer2.demo D/EventLogger: loading [false]
12-28 17:08:21.944 13641-13641/com.google.android.exoplayer2.demo D/EventLogger: state [8.52, true, I]
12-28 17:08:22.725 13641-15032/com.google.android.exoplayer2.demo E/FLACParser: FLACParser::readBuffer process_single failed. Status: FLAC__STREAM_DECODER_ABORTED
12-28 17:08:22.730 13641-15031/com.google.android.exoplayer2.demo V/FLACParser: FLACParser::~FLACParser

adb bugreport is sent to dev.exoplayer@gmail.com because I fear there is some sensitive info on the report.

erdemguven commented 6 years ago

Please try on a real device and let us know the result.

erdemguven commented 6 years ago

Related #3514

yukuku commented 6 years ago

I tried to play the APK on OnePlus 5 (Android 7.1). Same stack trace appeared.

12-29 15:04:54.005 21905                         D  audioFormatChanged [0.10, id=null, mimeType=audio/raw, bitrate=705600, channels=1, sample_rate=44100]
12-29 15:04:54.005 22945  ExoPlayerImplInternal  E  Internal runtime error.
12-29 15:04:54.005 22945                         E  java.lang.IllegalStateException: Buffer too small (32768 < 131070)
12-29 15:04:54.005 22945                         E      at com.google.android.exoplayer2.decoder.DecoderInputBuffer.createReplacementByteBuffer(DecoderInputBuffer.java:160)
12-29 15:04:54.005 22945                         E      at com.google.android.exoplayer2.decoder.DecoderInputBuffer.ensureSpaceForWrite(DecoderInputBuffer.java:110)
12-29 15:04:54.005 22945                         E      at com.google.android.exoplayer2.source.SampleQueue.read(SampleQueue.java:318)
12-29 15:04:54.005 22945                         E      at com.google.android.exoplayer2.source.ExtractorMediaPeriod.readData(ExtractorMediaPeriod.java:376)
12-29 15:04:54.005 22945                         E      at com.google.android.exoplayer2.source.ExtractorMediaPeriod$SampleStreamImpl.readData(ExtractorMediaPeriod.java:641)
12-29 15:04:54.005 22945                         E      at com.google.android.exoplayer2.BaseRenderer.readSource(BaseRenderer.java:280)
12-29 15:04:54.005 22945                         E      at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:663)
12-29 15:04:54.005 22945                         E      at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:553)
12-29 15:04:54.005 22945                         E      at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:560)
12-29 15:04:54.005 22945                         E      at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:306)
12-29 15:04:54.005 22945                         E      at android.os.Handler.dispatchMessage(Handler.java:98)
12-29 15:04:54.005 22945                         E      at android.os.Looper.loop(Looper.java:154)
12-29 15:04:54.005 22945                         E      at android.os.HandlerThread.run(HandlerThread.java:61)
12-29 15:04:54.006 21905            EventLogger  D  state [0.10, true, R]
12-29 15:04:54.007 21905                         D  loading [false]
12-29 15:04:54.009 22945             FLACParser  V  FLACParser::~FLACParser
12-29 15:04:54.024 21905            EventLogger  E  playerFailed [0.12]
12-29 15:04:54.024 21905                         E  com.google.android.exoplayer2.ExoPlaybackException
12-29 15:04:54.024 21905                         E      at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:360)
12-29 15:04:54.024 21905                         E      at android.os.Handler.dispatchMessage(Handler.java:98)
12-29 15:04:54.024 21905                         E      at android.os.Looper.loop(Looper.java:154)
12-29 15:04:54.024 21905                         E      at android.os.HandlerThread.run(HandlerThread.java:61)
12-29 15:04:54.024 21905                         E  Caused by: java.lang.IllegalStateException: Buffer too small (32768 < 131070)
12-29 15:04:54.024 21905                         E      at com.google.android.exoplayer2.decoder.DecoderInputBuffer.createReplacementByteBuffer(DecoderInputBuffer.java:160)
12-29 15:04:54.024 21905                         E      at com.google.android.exoplayer2.decoder.DecoderInputBuffer.ensureSpaceForWrite(DecoderInputBuffer.java:110)
12-29 15:04:54.024 21905                         E      at com.google.android.exoplayer2.source.SampleQueue.read(SampleQueue.java:318)
12-29 15:04:54.024 21905                         E      at com.google.android.exoplayer2.source.ExtractorMediaPeriod.readData(ExtractorMediaPeriod.java:376)
12-29 15:04:54.024 21905                         E      at com.google.android.exoplayer2.source.ExtractorMediaPeriod$SampleStreamImpl.readData(ExtractorMediaPeriod.java:641)
12-29 15:04:54.024 21905                         E      at com.google.android.exoplayer2.BaseRenderer.readSource(BaseRenderer.java:280)
12-29 15:04:54.024 21905                         E      at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:663)
12-29 15:04:54.024 21905                         E      at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:553)
12-29 15:04:54.024 21905                         E      at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:560)
12-29 15:04:54.024 21905                         E      at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:306)
12-29 15:04:54.024 21905                         E      ... 3 more
12-29 15:04:54.024 21905                         D  audioDisabled [0.12]
12-29 15:04:54.025 21905                         D  state [0.12, true, I]

adb bugreport is sent by email with subject #3648 adb bugreport from OnePlus 5

ojw28 commented 6 years ago

Marking as duplicate of #3514.