Handle edit lists with one 0 duration edit.
Issue: #1102 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=111497855
This commit is contained in:
parent
5b54dc5f8f
commit
d740bf9f23
@ -262,6 +262,17 @@ import java.util.List;
|
||||
// implementation handles simple discarding/delaying of samples. The extractor may place
|
||||
// further restrictions on what edited streams are playable.
|
||||
|
||||
if (track.editListDurations.length == 1 && track.editListDurations[0] == 0) {
|
||||
// The current version of the spec leaves handling of an edit with zero segment_duration in
|
||||
// unfragmented files open to interpretation. We handle this as a special case and include all
|
||||
// samples in the edit.
|
||||
for (int i = 0; i < timestamps.length; i++) {
|
||||
timestamps[i] = Util.scaleLargeTimestamp(timestamps[i] - track.editListMediaTimes[0],
|
||||
C.MICROS_PER_SECOND, track.timescale);
|
||||
}
|
||||
return new TrackSampleTable(offsets, sizes, maximumSize, timestamps, flags);
|
||||
}
|
||||
|
||||
// Count the number of samples after applying edits.
|
||||
int editedSampleCount = 0;
|
||||
int nextSampleIndex = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user