Вопрос

I am building an android video player app with the new API MediaCodec and MediaExtractor (available from API 16). It normally works well but sometimes I have a crash with a very meaningless messages:

09-30 16:39:13.985: A/MediaCodec(6508): frameworks/av/media/libstagefright/MediaCodec.cpp:423 CHECK(buffer->meta()->findInt64("timeUs", &timeUs)) failed.
09-30 16:39:13.985: A/libc(6508): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 12769 (MediaCodec_loop)

If would be good if somebody could give me a better understanding of what was going wrong. The crash normally happens when I open the video, play a little bit, quit it, going to another video. It only happens very few amount of time but very annoying.

Это было полезно?

Решение

I finally find out the solution. I answer here so people who found the same problem can fix it.

When my mediacodec plays near the end of file, it doesn't queue more input buffer into the inputQueue, therefore when it needs to dequeue the buffers, it cannot find any buffer to play

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top