【问题标题】:Mediacodec jelly-beanMediacodec 果冻豆
【发布时间】:2013-02-12 21:23:27
【问题描述】:

我正在为 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)

谁能告诉我这是什么? 以及如何解决?

【问题讨论】:

  • 你找到解决办法了吗?我也在一些特定的设备上得到了这个

标签: android mp4 android-4.2-jelly-bean


【解决方案1】:

您提供的信息不多,所以答案如下:

看起来是 libstagefright 库的内部检查。

我在 Samsung Tab 2 的解码器配置上遇到了同样的错误。

mDecoder = MediaCodec.createDecoderByType(mime);

解码器创建后,它通过从提取器(又名解复用器)接收到的输入格式进行配置

MediaFormat inputFormat = extractor.getTrackFormat(i);

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

修复(放在 mDecoder.configure 之前):

inputFormat.setInteger(MediaFormat.KEY_MAX_INPUT_SIZE, 0);

【讨论】:

  • 是的,这就是问题(Max_input_size)。我忘记发布解决方案了。
猜你喜欢
  • 2012-11-10
  • 2013-05-21
  • 1970-01-01
  • 2012-08-09
  • 1970-01-01
  • 1970-01-01
  • 2012-09-23
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多