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

exoplayer2.ParserException wav local file #341

Closed
dfdgsdfg opened this issue Aug 27, 2020 · 2 comments
Closed

exoplayer2.ParserException wav local file #341

dfdgsdfg opened this issue Aug 27, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@dfdgsdfg
Copy link

Flutter Version

My version : 1.20.2

Lib Version

My version : 2.0.9 + 2

Platform (Android / iOS / web) + version

Platform: Android API 29

Describe the bug

Seems ExoPlayer fail then fallback to mediaplayer.

The first play is okay but after that, it does not play anymore without any error or any reaction.

I/flutter (31092): CreateShortPostBloc: stopRecord: /data/user/0/my.app.dev/app_flutter/tmp.wav
I/ExoPlayerImpl(31092): Init 512a8e9 [ExoPlayerLib/2.11.4] [laurel_sprout, Mi A3, Xiaomi, 29]
E/ExoPlayerImplInternal(31092): Source error
E/ExoPlayerImplInternal(31092):   com.google.android.exoplayer2.ParserException: Expected block size: 2; got: 1
E/ExoPlayerImplInternal(31092):       at com.google.android.exoplayer2.extractor.wav.WavExtractor$PassthroughOutputWriter.<init>(WavExtractor.java:222)
E/ExoPlayerImplInternal(31092):       at com.google.android.exoplayer2.extractor.wav.WavExtractor.read(WavExtractor.java:122)
E/ExoPlayerImplInternal(31092):       at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:982)
E/ExoPlayerImplInternal(31092):       at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:391)
E/ExoPlayerImplInternal(31092):       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/ExoPlayerImplInternal(31092):       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/ExoPlayerImplInternal(31092):       at java.lang.Thread.run(Thread.java:919)
I/ExoPlayerImpl(31092): Release 512a8e9 [ExoPlayerLib/2.11.4] [laurel_sprout, Mi A3, Xiaomi, 29] [goog.exo.core]
V/MediaPlayer(31092): resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
V/MediaPlayer(31092): cleanDrmObj: mDrmObj=null mDrmSessionId=null
I/flutter (31092): asdfasdfasdfasdf true
I/flutter (31092): CreateShortPostBloc: playRecorded
V/MediaPlayer(31092): resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
V/MediaPlayer(31092): cleanDrmObj: mDrmObj=null mDrmSessionId=null
W/MediaPlayer(31092): mediaplayer went away with unhandled events

Small code to reproduce

@dfdgsdfg dfdgsdfg added the bug Something isn't working label Aug 27, 2020
@dfdgsdfg
Copy link
Author

ryanheise/just_audio#158

Seems exoplayer2 parser error.

The Wave file generated by https://pub.dev/packages/flutter_audio_recorder.

@dfdgsdfg
Copy link
Author

It is just the wrong wave header problem.

rmbrone/flutter_audio_recorder#11

Asset_player is working just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants