0

I am trying a video recording sample, i.e google's 4.1 Media Codec api. It runs fine on most devices, but while running it on a Sony Experia P with android 4.1.2 it crashes with an error : frameworks/av/media/libstagefright/ACodec.cpp:1029 CHECK(def.nBufferSize >= size) failed.

The program crashes at mMediaCodec.configure(mediaFormat, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE);

On debugging I found that it crashes exactly at this statement native_configure(keys, values, surface, crypto, flags);

Could someone please help me with this issue.

rKrishna
  • 1,399
  • 12
  • 22
  • 1
    That's an assertion in libstagefright. A quick search for that failure with google turned up this: http://stackoverflow.com/questions/15105843/mediacodec-jelly-bean – fadden Jul 30 '14 at 15:13
  • If we add this will get " Java. no. BufferOverflowException " exception – rKrishna Jul 31 '14 at 07:59
  • When working with mediacodec, BufferOverflowException is usually the result of not configuring the buffer info. See http://bigflake.com/mediacodec/#q11 – fadden Jul 31 '14 at 14:52

0 Answers0