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

小米9录制Crash #38

Open
wangliang0209 opened this issue Jul 23, 2019 · 4 comments
Open

小米9录制Crash #38

wangliang0209 opened this issue Jul 23, 2019 · 4 comments

Comments

@wangliang0209
Copy link

OS Version: 9_28
Vendor: Xiaomi
Model: MI 9
CPU ABI: armeabi-v7a

java.lang.IllegalStateException: writeSampleData returned an error
at android.media.MediaMuxer.nativeWriteSampleData(Native Method)
at android.media.MediaMuxer.writeSampleData(MediaMuxer.java:682)
at com.wl.screenrecorder.ScreenRecorder.writeSampleData(ScreenRecorder.java:287)
at com.wl.screenrecorder.ScreenRecorder.signalEndOfStream(ScreenRecorder.java:176)
at com.wlscreenrecorder.ScreenRecorder.access$300(ScreenRecorder.java:42)

@yrom
Copy link
Owner

yrom commented Jul 23, 2019

有其它的日志吗,logcat里

@zxjrainbow
Copy link

zxjrainbow commented Jul 23, 2019 via email

@NoahZu
Copy link

NoahZu commented Sep 30, 2019

我用这个项目改造了一下 也遇到这个问题了,经过我的调试,发现是在MediaMuxer 调用writeSampleData的时候写入的音频数据的时间戳有问题,出现了新的时间戳比旧的时间戳还小的问题,主要问题出在resetAudioPts。不过也有可能是我进行了改造造成的,可以参考一下。 @yrom

@kimonic
Copy link

kimonic commented Jan 17, 2020

这个问题怎么解决?
java.lang.IllegalStateException: writeSampleData returned an error
at android.media.MediaMuxer.nativeWriteSampleData(Native Method)
at android.media.MediaMuxer.writeSampleData(MediaMuxer.java:714)
at com.hisense.screenrecord.recorder.ScreenRecorder.writeSampleData(ScreenRecorder.java:446)
at com.hisense.screenrecord.recorder.ScreenRecorder.muxVideo(ScreenRecorder.java:290)
at com.hisense.screenrecord.recorder.ScreenRecorder.access$500(ScreenRecorder.java:59)
at com.hisense.screenrecord.recorder.ScreenRecorder$2.onOutputBufferAvailable(ScreenRecorder.java:541)
at com.hisense.screenrecord.recorder.BaseEncoder$1.onOutputBufferAvailable(BaseEncoder.java:197)
at android.media.MediaCodec$EventHandler.handleCallback(MediaCodec.java:1706)
at android.media.MediaCodec$EventHandler.handleMessage(MediaCodec.java:1653)
at android.os.Handler.dispatchMessage(Handler.java:112)
at android.os.Looper.loop(Looper.java:216)
at android.os.HandlerThread.run(HandlerThread.java:65)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants