Commit 6eea4bdb by Andrew Lewis

Merge pull request #1105 from IanDBird/eac3-fixes

Improve identification of (E)AC3 content in MPEGTS and tweak EAC3 parsing
parents f4c10dc5 2b1816c1
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment