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.