asBuffer() method is returning ByteBuffer correctly, but write(ByteBuffer) method is not
sandeep5193 opened this issue · comments
I am using this for every camera frame, so I want to use my own ByteBuffer instead of getting a new instance every time I convert a I420 buffer to ARGB.
asBuffer() is returning new ByteBuffer everytime, so I tried write(ByteBuffer) method. first time it is returning correct data, but not after that.
My guess is, write(ByteBuffer) method needs to set source ByteBuffer position to 0 before starting to copy, just like it does in asBuffer().
it.position(0)
Am I missing something?
Thanks for the report.
v0.22.0 released.
Set position to 0 and write to ByteBuffer when write(ByteBuffer) is invoked.
thanks for quickly fixing it. waiting for release on maven central now.