mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Handle dynamic appearance/disappearance of ID3 track in HLS.
This commit is contained in:
parent
5f74226d67
commit
fb97fca04e
1 changed files with 5 additions and 1 deletions
|
|
@ -231,6 +231,10 @@ public final class TsExtractor implements Extractor {
|
|||
// Skip the descriptors.
|
||||
data.skipBytes(programInfoLength);
|
||||
|
||||
// Setup an ID3 track regardless of whether there's a corresponding entry, in case one
|
||||
// appears intermittently during playback. See b/20261500.
|
||||
Id3Reader id3Reader = new Id3Reader(output.track(TS_STREAM_TYPE_ID3));
|
||||
|
||||
int entriesSize = sectionLength - 9 /* Size of the rest of the fields before descriptors */
|
||||
- programInfoLength - 4 /* CRC size */;
|
||||
while (entriesSize > 0) {
|
||||
|
|
@ -261,7 +265,7 @@ public final class TsExtractor implements Extractor {
|
|||
seiReader);
|
||||
break;
|
||||
case TS_STREAM_TYPE_ID3:
|
||||
pesPayloadReader = new Id3Reader(output.track(TS_STREAM_TYPE_ID3));
|
||||
pesPayloadReader = id3Reader;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue