mirror of
https://github.com/samsonjs/media.git
synced 2026-04-03 10:55:48 +00:00
Merge pull request #1105 from IanDBird/eac3-fixes
Improve identification of (E)AC3 content in MPEGTS and tweak EAC3 parsing
This commit is contained in:
commit
6eea4bdbc3
2 changed files with 8 additions and 1 deletions
|
|
@ -392,7 +392,14 @@ public final class TsExtractor implements Extractor {
|
|||
streamType = TS_STREAM_TYPE_H265;
|
||||
}
|
||||
break;
|
||||
} else if (descriptorTag == 0x6a) {
|
||||
streamType = TS_STREAM_TYPE_AC3;
|
||||
} else if (descriptorTag == 0x7a) {
|
||||
streamType = TS_STREAM_TYPE_E_AC3;
|
||||
} else if (descriptorTag == 0x7b) {
|
||||
// TODO: TS_STREAM_TYPE_DTS;
|
||||
}
|
||||
|
||||
data.skipBytes(descriptorLength);
|
||||
}
|
||||
data.setPosition(descriptorsEndPosition);
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ public final class Ac3Util {
|
|||
*/
|
||||
public static MediaFormat parseEac3SyncframeFormat(ParsableBitArray data, String trackId,
|
||||
long durationUs, String language) {
|
||||
data.skipBits(16 + 2 + 11); // syncword, strmtype, frmsiz
|
||||
data.skipBits(16 + 2 + 3 + 11); // syncword, strmtype, strmid, frmsiz
|
||||
int sampleRate;
|
||||
int fscod = data.readBits(2);
|
||||
if (fscod == 3) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue