Android MediaCodec dequeueOutputBuffer always return -1 in samsung device android 10

Viewed 169

My application(android) has a method of encoding and decoding voice data with a codec. dequeueOutputBuffer always return -1 appears only on Samsung devices after Android 10 version. There was no problem with Android 9, but after upgrading to Samsung 10 on Samsung devices occur. There is no such symptom on other Android 10 devices. Can you tell me why?

dequeueOutputBuffer always return -1 only android 10 , Samsung devices.

not a GALAXY NOTE Series

1 Answers

I had the same problem recently. Everything was fine, the buffers were fed to to the codec, but still the "dequeueOutputBuffer" returned -1. In my case the buffers were saved and read from a server, so I started to lower the MediaFormat values and that helped. One could say that in this issue a lot depends also on the quality of the internet connection. In my next steps I would consider separating the MediaFormat values separately for encoding and decoding. I read somewhere on stackoverflow that the decoder does not necessarily require the same all settings as the encoder as these were already included in the encoding proccess. It is possible that this could improve performance.

Related