mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Correctly handle reading 0 bits
This commit is contained in:
parent
85445536c3
commit
9c2528a70f
@ -155,6 +155,9 @@ public final class ParsableBitArray {
|
||||
* @return An integer whose bottom n bits hold the read data.
|
||||
*/
|
||||
public int readBits(int numBits) {
|
||||
if (numBits == 0) {
|
||||
return 0;
|
||||
}
|
||||
int returnValue = 0;
|
||||
bitOffset += numBits;
|
||||
while (bitOffset > 8) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user