That's the expected (albeit undocumented) behavior. You can either send the output to a ByteBuffer
or to a Surface
, but not both.
Some additional examples that may be of interest are available here. If you decode to a SurfaceTexture
you can render the texture twice, once to a View
and once to a pbuffer surface. You can either use glReadPixels
to get the data and process it, or do your processing in a GLES shader.
If you extract to a ByteBuffer
, you have to interpret the data yourself, which is difficult on devices that use a proprietary output format. You'll note from the buffer-to-buffer CTS tests that some devices aren't checked because the format isn't known.