Again, I have a question as regards Android\'s MediaCodec class.
I have successfully managed to decode raw h264 content and display the result in two TextureViews. The
I would not be surprised if the blocking call in onInputBufferAvailable
is the culprit. It feels probable that both onInputBufferAvailable
and onOutputBufferAvailable
are called within the same thread, and if you block in one, you stop the other one from running.
I would suggest changing it so that you in onInputBufferAvailable
just push the buffer index onto some queue, and signal a different thread that there's another buffer available now, then having this second thread wait for buffers from the queue, and do a blocking fetch of input data there.