mirror of
https://github.com/samsonjs/media.git
synced 2026-03-29 10:05:48 +00:00
Update parseStbl to handle edit lists & gapless info
Without this, a subtitle track empty edit list used to offset the start of subtitles is ignored. Also the current code seems to depend on the order in which we parse the tracks (audio first means we have gapless info when we parse video track, while video first we wouldn't). It's not clear why we can't handle both edit lists & gapless info PiperOrigin-RevId: 276029744
This commit is contained in:
parent
2dbc5755f6
commit
2c721130b1
1 changed files with 1 additions and 3 deletions
|
|
@ -348,9 +348,7 @@ import java.util.List;
|
|||
}
|
||||
long durationUs = Util.scaleLargeTimestamp(duration, C.MICROS_PER_SECOND, track.timescale);
|
||||
|
||||
if (track.editListDurations == null || gaplessInfoHolder.hasGaplessInfo()) {
|
||||
// There is no edit list, or we are ignoring it as we already have gapless metadata to apply.
|
||||
// This implementation does not support applying both gapless metadata and an edit list.
|
||||
if (track.editListDurations == null) {
|
||||
Util.scaleLargeTimestampsInPlace(timestamps, C.MICROS_PER_SECOND, track.timescale);
|
||||
return new TrackSampleTable(
|
||||
track, offsets, sizes, maximumSize, timestamps, flags, durationUs);
|
||||
|
|
|
|||
Loading…
Reference in a new issue