-
Notifications
You must be signed in to change notification settings - Fork 163
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
android下,avcodec_open2调用失败 #54
Comments
ffmpeg 用的什么版本? |
ffmpeg是用你的仓库下的 版本。仓库中编译好的libfanplayer_jni.so的硬解可以正常运行。为了方便调试,我把你的这个工程转成了cmake的Android工程。 |
CMakeLists.txt文件如下: |
|
我这个新的工程可以播放,但是只能软解,不知道为啥 |
ffmpeg 的版本要注意,android 要支持硬件解码只能用 n3.3.x 这个分支。n4.x.x 的 ffmpeg 对 mediacodec 硬件的支持是有问题的。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
为了能够让播放器实现硬解,重新编译了ffmpeg(加入了编译选项:--enable-hwaccel=h264_mediacodec),decoder = avcodec_find_decoder_by_name("h264_mediacodec");这一句后,获取的decoder 不为空,但是执行到avcodec_open2(player->vcodec_context, decoder, NULL),返回值小于0,执行失败,用av_strerror函数输出错误:Generic error in an external library。运行环境:华为鸿蒙OS平板。
The text was updated successfully, but these errors were encountered: