Conserve ByteOrder when growingDecoderInputBuffer

#exo-offload

PiperOrigin-RevId: 302403507
This commit is contained in:
krocard 2020-03-23 11:09:19 +00:00 committed by Oliver Woodman
parent d38c6c84a6
commit 1fa9dbc31e

View File

@ -137,6 +137,7 @@ public class DecoderInputBuffer extends Buffer {
} }
// Instantiate a new buffer if possible. // Instantiate a new buffer if possible.
ByteBuffer newData = createReplacementByteBuffer(requiredCapacity); ByteBuffer newData = createReplacementByteBuffer(requiredCapacity);
newData.order(data.order());
// Copy data up to the current position from the old buffer to the new one. // Copy data up to the current position from the old buffer to the new one.
if (position > 0) { if (position > 0) {
data.flip(); data.flip();