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

连续播放vap 视频会出现 MediaExtractor exception:Failed to instantiate extractor #78

Closed
luohong opened this issue Apr 29, 2021 · 3 comments

Comments

@luohong
Copy link

luohong commented Apr 29, 2021

issue 模版
1 问题描述(重现路径)

在Assets目录下的同一个视频文件反复播放,间隔100毫秒(不同视频文件连续播放也会,即使增加播放时间间隔到2s),有一定的概率会出现:MediaExtractor exception:Failed to instantiate extractor

除了 Failed to instantiate extractor ,其他异常也很多。大部分没问题,偶尔就会出现异常

2 运行环境(手机型号,Android/iOS版本等)

Android 11 Google Pixel 3,但是其他所有手机也会这样,不同的系统版本都会

3 相关日志

2021-04-29 11:37:21.635 24084-26873/? E/AnimPlayer.HardDecoder: MediaExtractor exception e=java.io.IOException: Failed to instantiate extractor.
java.io.IOException: Failed to instantiate extractor.
at android.media.MediaExtractor.setDataSource(Native Method)
at com.tencent.qgame.animplayer.file.AssetsFileContainer.setDataSource(AssetsFileContainer.kt:42)
at com.tencent.qgame.animplayer.util.MediaUtil.getExtractor(MediaUtil.kt:40)
at com.tencent.qgame.animplayer.HardDecoder.startPlay(HardDecoder.kt:83)
at com.tencent.qgame.animplayer.HardDecoder.access$startPlay(HardDecoder.kt:28)
at com.tencent.qgame.animplayer.HardDecoder$start$1.run(HardDecoder.kt:44)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.os.HandlerThread.run(HandlerThread.java:67)

4 播放错误的文件(可选)

live_pk_begin.mp4

image

@luohong
Copy link
Author

luohong commented Apr 29, 2021

#38

貌似是 MediaExtractor 读取 Assets 目录下文件兼容性问题?

@hexleo
Copy link
Collaborator

hexleo commented Apr 30, 2021

播放asset目录文件一直有这个问题,没查到具体原因,偶现问题很难查。
你们指的反复播放,是在接到onComplete 回调后才重新开始播放,还是调用stop后马上进行播放?

@luohong
Copy link
Author

luohong commented May 1, 2021

播放asset目录文件一直有这个问题,没查到具体原因,偶现问题很难查。
你们指的反复播放,是在接到onComplete 回调后才重新开始播放,还是调用stop后马上进行播放?

是在 onComplete 之后延迟 100毫秒 (尝试过2秒)才重新开始播放

@hexleo hexleo closed this as completed Jan 10, 2023
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

2 participants