Ignore channelCount and sampleRate values read from iamf box

As per the IAMF spec (https://aomediacodec.github.io/iamf/#iasampleentry-section), `channelCount` and `sampleRate` SHALL be set to `0` and ignored.

#cherrypick

PiperOrigin-RevId: 683648991
This commit is contained in:
rohks 2024-10-08 09:15:37 -07:00 committed by Copybara-Service
parent 8f82a15e48
commit 72ab282c0d
21 changed files with 8 additions and 40 deletions

View File

@ -1759,6 +1759,14 @@ public final class BoxParser {
return;
}
// As per the IAMF spec (https://aomediacodec.github.io/iamf/#iasampleentry-section),
// channelCount and sampleRate SHALL be set to 0 and ignored. We ignore it by using
// Format.NO_VALUE instead of 0.
if (atomType == Mp4Box.TYPE_iamf) {
channelCount = Format.NO_VALUE;
sampleRate = Format.NO_VALUE;
}
int childPosition = parent.getPosition();
if (atomType == Mp4Box.TYPE_enca) {
@Nullable

View File

@ -12,8 +12,6 @@ track 0:
format 0:
id = 1
sampleMimeType = audio/iamf
channelCount = 0
sampleRate = 0
language = und
initializationData:
data = length 119, hash 99A80807

View File

@ -12,8 +12,6 @@ track 0:
format 0:
id = 1
sampleMimeType = audio/iamf
channelCount = 0
sampleRate = 0
language = und
initializationData:
data = length 119, hash 99A80807

View File

@ -12,8 +12,6 @@ track 0:
format 0:
id = 1
sampleMimeType = audio/iamf
channelCount = 0
sampleRate = 0
language = und
initializationData:
data = length 119, hash 99A80807

View File

@ -12,8 +12,6 @@ track 0:
format 0:
id = 1
sampleMimeType = audio/iamf
channelCount = 0
sampleRate = 0
language = und
initializationData:
data = length 119, hash 99A80807

View File

@ -12,8 +12,6 @@ track 0:
format 0:
id = 1
sampleMimeType = audio/iamf
channelCount = 0
sampleRate = 0
language = und
initializationData:
data = length 119, hash 99A80807

View File

@ -12,8 +12,6 @@ track 0:
format 0:
id = 1
sampleMimeType = audio/iamf
channelCount = 0
sampleRate = 0
language = und
initializationData:
data = length 119, hash 99A80807

View File

@ -12,8 +12,6 @@ track 0:
format 0:
id = 1
sampleMimeType = audio/iamf
channelCount = 0
sampleRate = 0
language = und
initializationData:
data = length 119, hash 99A80807

View File

@ -12,8 +12,6 @@ track 0:
format 0:
id = 1
sampleMimeType = audio/iamf
channelCount = 0
sampleRate = 0
language = und
initializationData:
data = length 119, hash 99A80807

View File

@ -12,8 +12,6 @@ track 0:
format 0:
id = 1
sampleMimeType = audio/iamf
channelCount = 0
sampleRate = 0
language = und
initializationData:
data = length 119, hash 99A80807

View File

@ -12,8 +12,6 @@ track 0:
format 0:
id = 1
sampleMimeType = audio/iamf
channelCount = 0
sampleRate = 0
language = und
initializationData:
data = length 119, hash 99A80807

View File

@ -13,8 +13,6 @@ track 0:
id = 1
sampleMimeType = audio/iamf
maxInputSize = 299
channelCount = 0
sampleRate = 0
language = und
metadata = entries=[Mp4Timestamp: creation time=3764707200, modification time=3764707200, timescale=16000]
initializationData:

View File

@ -13,8 +13,6 @@ track 0:
id = 1
sampleMimeType = audio/iamf
maxInputSize = 299
channelCount = 0
sampleRate = 0
language = und
metadata = entries=[Mp4Timestamp: creation time=3764707200, modification time=3764707200, timescale=16000]
initializationData:

View File

@ -13,8 +13,6 @@ track 0:
id = 1
sampleMimeType = audio/iamf
maxInputSize = 299
channelCount = 0
sampleRate = 0
language = und
metadata = entries=[Mp4Timestamp: creation time=3764707200, modification time=3764707200, timescale=16000]
initializationData:

View File

@ -13,8 +13,6 @@ track 0:
id = 1
sampleMimeType = audio/iamf
maxInputSize = 299
channelCount = 0
sampleRate = 0
language = und
metadata = entries=[Mp4Timestamp: creation time=3764707200, modification time=3764707200, timescale=16000]
initializationData:

View File

@ -13,8 +13,6 @@ track 0:
id = 1
sampleMimeType = audio/iamf
maxInputSize = 299
channelCount = 0
sampleRate = 0
language = und
metadata = entries=[Mp4Timestamp: creation time=3764707200, modification time=3764707200, timescale=16000]
initializationData:

View File

@ -13,8 +13,6 @@ track 0:
id = 1
sampleMimeType = audio/iamf
maxInputSize = 299
channelCount = 0
sampleRate = 0
language = und
metadata = entries=[Mp4Timestamp: creation time=3764707200, modification time=3764707200, timescale=16000]
initializationData:

View File

@ -13,8 +13,6 @@ track 0:
id = 1
sampleMimeType = audio/iamf
maxInputSize = 299
channelCount = 0
sampleRate = 0
language = und
metadata = entries=[Mp4Timestamp: creation time=3764707200, modification time=3764707200, timescale=16000]
initializationData:

View File

@ -13,8 +13,6 @@ track 0:
id = 1
sampleMimeType = audio/iamf
maxInputSize = 299
channelCount = 0
sampleRate = 0
language = und
metadata = entries=[Mp4Timestamp: creation time=3764707200, modification time=3764707200, timescale=16000]
initializationData:

View File

@ -13,8 +13,6 @@ track 0:
id = 1
sampleMimeType = audio/iamf
maxInputSize = 299
channelCount = 0
sampleRate = 0
language = und
metadata = entries=[Mp4Timestamp: creation time=3764707200, modification time=3764707200, timescale=16000]
initializationData:

View File

@ -13,8 +13,6 @@ track 0:
id = 1
sampleMimeType = audio/iamf
maxInputSize = 299
channelCount = 0
sampleRate = 0
language = und
metadata = entries=[Mp4Timestamp: creation time=3764707200, modification time=3764707200, timescale=16000]
initializationData: