作者你好,请教个ijkplayer提交说明
- Dominant language
- C
- Stars
- 33.2k
- Forks
- 8.2k
- PR merge metrics
- No merged PRs in 30d
Description
ijkplayer 7ab0abe5提交中说遇到了codec随机crash问题,并增加了如下一句修改处理,
SDL_VoutAndroid_setAMediaCodec(opaque->weak_vout, NULL);
但这句处理中,invalidateAllBuffers在stop操作前已做处理,decreaseReferenceP acodec处理在
新增加的补丁前已做处理,所以不明白加的patch是如何生效的?
另外提交说明说到,问题原因是在创建新的mediacodec前,没有先release 上次的mediacodec,
而在加这个patch前已经有做先release mediacodec,然后new mediacodec, 所以对这个修改
有点疑惑,望帮忙指明,十分感谢,期待您的回复,谢谢。
详细提交内容见下:
7ab0abe5e3dcb60b1942b0a7a7a4cc2daff21867
Fix reconfigure codec randomly crash.
ijkplayer used to stop previous mediacodec & create a new mediacodec, then release previous.
background knowledge:
vendor vdec drv init, checking codec & alloc framebuffer to hw, the framebuffer will returned to memmap until call the deinit.
in android native mediacodec impl:
mediacodec stop do not deinit omx component(just changed omx state to idle), continues create a new mediacodec would lead some vendor drv notify err(ex :InsufficientResources) due to memory is not enough or vendor hw limitation(one instance).
this case is not appeared in android mediaplayer becoz nuplayer would release previous mediacodec then create a new one.
solution: release previous mediacodec then create a new one when reconfigure codec.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.