Replace BitArray.skipBytes() with BitArray.skipBits()

Based on the spec, ETSI TS 102 366 V1.4.1 Annex F, 6 bits should have skipped instead of 6 bytes.

This correction was pointed out in Issue: androidx/media#474.

PiperOrigin-RevId: 545658365
(cherry picked from commit 07d4e5986b06ef6e362fe00fb97187469f42bc25)
This commit is contained in:
rohks 2023-07-05 15:04:50 +01:00 committed by Tianyi Feng
parent bcde7e03c2
commit 0c6cfea048

View File

@ -214,7 +214,7 @@ public final class Ac3Util {
int numDepSub = dataBitArray.readBits(4); // num_dep_sub int numDepSub = dataBitArray.readBits(4); // num_dep_sub
dataBitArray.skipBits(1); // numDepSub > 0 ? LFE2 : reserved dataBitArray.skipBits(1); // numDepSub > 0 ? LFE2 : reserved
if (numDepSub > 0) { if (numDepSub > 0) {
dataBitArray.skipBytes(6); // other channel configurations dataBitArray.skipBits(6); // other channel configurations
// Read Lrs/Rrs pair // Read Lrs/Rrs pair
// TODO: Read other channel configuration // TODO: Read other channel configuration
if (dataBitArray.readBits(1) != 0) { if (dataBitArray.readBits(1) != 0) {