mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Add explicit cast to ByteBuffer for Java 8 compatibility
PiperOrigin-RevId: 451994696 (cherry picked from commit 5cdac6575e662bf575b4890f17b600e7b17bffac)
This commit is contained in:
parent
711409ab51
commit
00ae09f459
@ -200,8 +200,12 @@ public final class OpusDecoderTest {
|
|||||||
return ImmutableList.of(HEADER, preSkip, CUSTOM_SEEK_PRE_ROLL_BYTES);
|
return ImmutableList.of(HEADER, preSkip, CUSTOM_SEEK_PRE_ROLL_BYTES);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The cast to ByteBuffer is required for Java 8 compatibility. See
|
||||||
|
// https://issues.apache.org/jira/browse/MRESOLVER-85
|
||||||
|
@SuppressWarnings("UnnecessaryCast")
|
||||||
private static ByteBuffer createSupplementalData(long value) {
|
private static ByteBuffer createSupplementalData(long value) {
|
||||||
return ByteBuffer.allocate(8).order(ByteOrder.LITTLE_ENDIAN).putLong(value).rewind();
|
return (ByteBuffer)
|
||||||
|
ByteBuffer.allocate(8).order(ByteOrder.LITTLE_ENDIAN).putLong(value).rewind();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static DecoderInputBuffer createInputBuffer(
|
private static DecoderInputBuffer createInputBuffer(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user