Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (inputIndex >= 0) {
- ByteBuffer buffer;
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
- buffer = m_codec.getInputBuffers()[inputIndex];
- buffer.clear();
- } else {
- buffer = m_codec.getInputBuffer(inputIndex);
- }
- if (buffer != null) {
- buffer.put(videoBuffer, 0, videoBuffer.length);
- m_codec.queueInputBuffer(inputIndex, 0, videoBuffer.length, 0, 0);
- }
- }
- //always return -1
- int outputBufferId = m_codec.dequeueOutputBuffer(info,TIMEOUT_USEC);
Add Comment
Please, Sign In to add comment