Guest User

Untitled

a guest
Mar 22nd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. if (inputIndex >= 0) {
  2.  
  3. ByteBuffer buffer;
  4. if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
  5. buffer = m_codec.getInputBuffers()[inputIndex];
  6. buffer.clear();
  7. } else {
  8. buffer = m_codec.getInputBuffer(inputIndex);
  9. }
  10. if (buffer != null) {
  11. buffer.put(videoBuffer, 0, videoBuffer.length);
  12. m_codec.queueInputBuffer(inputIndex, 0, videoBuffer.length, 0, 0);
  13. }
  14.  
  15. }
  16.  
  17. //always return -1
  18. int outputBufferId = m_codec.dequeueOutputBuffer(info,TIMEOUT_USEC);
Add Comment
Please, Sign In to add comment