mirror of
https://github.com/androidx/media.git
synced 2025-05-07 15:40:37 +08:00
Conserve ByteOrder when growingDecoderInputBuffer
#exo-offload PiperOrigin-RevId: 302403507
This commit is contained in:
parent
b67d79d775
commit
cac36be6eb
@ -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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user