简体   繁体   English

Mediacodec果冻豆

[英]Mediacodec jelly-bean

I'm working with media codec for an .mp4 file on jelly-bean and getting this in logcat 我正在使用媒体编解码器在jelly-bean上获取.mp4文件并在logcat中获取它

02-27 12:12:13.645: A/ACodec(6760): frameworks/av/media/libstagefright/ACodec.cpp:1041 CHECK(def.nBufferSize >= size) failed.
02-27 12:12:13.645: A/libc(6760): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 6778 (CodecLooper)

Can anyone tell me what is this? 谁能告诉我这是什么? and how to solve it? 以及如何解决?

You provided not much info, so the answer follows: 您提供的信息不多,所以答案如下:

Looks like it is internal check of libstagefright library. 看起来它是libstagefright库的内部检查。

I faced same error on Samsung Tab 2 on decoder's configuration. 在解码器的配置上,我在Samsung Tab 2上遇到了同样的错误。

mDecoder = MediaCodec.createDecoderByType(mime);

After the decoder is created it is configured by input format received from the extractor(aka demuxer) 在创建解码器之后,它通过从提取器(也称为解复用器)接收的输入格式进行配置

MediaFormat inputFormat = extractor.getTrackFormat(i);

mDecoder.configure(inputFormat, null, null, 0); // <-- crashes here

Fix (place it before mDecoder.configure): 修复(将它放在mDecoder.configure之前):

inputFormat.setInteger(MediaFormat.KEY_MAX_INPUT_SIZE, 0);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM