Skip to content

Commit e4d80c9

Browse files
committed
Skip aac DSE
1 parent d1eff56 commit e4d80c9

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

aac.cpp

+19
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const int EXT_SBR_DATA_CRC = 14;
4848

4949
const int ID_SCE = 0;
5050
const int ID_CPE = 1;
51+
const int ID_DSE = 4;
5152
const int ID_PCE = 5;
5253
const int ID_FIL = 6;
5354
const int ID_END = 7;
@@ -316,6 +317,20 @@ bool SingleChannelElement(const uint8_t *aac, size_t lenBytes, size_t &pos, bool
316317
return true;
317318
}
318319

320+
void DataStreamElement(const uint8_t *aac, size_t &pos)
321+
{
322+
pos += 4;
323+
bool dataByteAlignFlag = read_bool(aac, pos);
324+
int cnt = read_bits(aac, pos, 8);
325+
if (cnt == 255) {
326+
cnt += read_bits(aac, pos, 8);
327+
}
328+
if (dataByteAlignFlag) {
329+
ByteAlignment(pos);
330+
}
331+
pos += 8 * cnt;
332+
}
333+
319334
bool ProgramConfigElement(const uint8_t *aac, size_t lenBytes, size_t &pos)
320335
{
321336
pos += 10;
@@ -383,6 +398,10 @@ int RawDataBlock(const uint8_t *aac, size_t lenBytes, size_t &pos, bool is32khz)
383398
return id;
384399
}
385400
}
401+
else if (id == ID_DSE) {
402+
DataStreamElement(aac, pos);
403+
return id;
404+
}
386405
else if (id == ID_PCE) {
387406
if (ProgramConfigElement(aac, lenBytes, pos)) {
388407
return id;

0 commit comments

Comments
 (0)