mirror of
https://github.com/androidx/media.git
synced 2025-05-07 23:50:44 +08:00
Workaround/Fix #3351
1. Ignore edit list where the sequence doesn't contain a sync sample, rather than failing. 2. Make Mp4Extractor.readAtomPayload so it doesn't try and read the same payload twice if a failure occurs parsing it. 3. Make processAtomEnded so that it doesn't pop the moov if parsing it fails. Issue: #3351 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=172106244
This commit is contained in:
parent
51fd3365bb
commit
f6d0dae50e
@ -395,7 +395,11 @@ import java.util.List;
|
||||
hasSyncSample |= (editedFlags[i] & C.BUFFER_FLAG_KEY_FRAME) != 0;
|
||||
}
|
||||
if (!hasSyncSample) {
|
||||
throw new ParserException("The edited sample sequence does not contain a sync sample.");
|
||||
// We don't support edit lists where the edited sample sequence doesn't contain a sync sample.
|
||||
// Such edit lists are often (although not always) broken, so we ignore it and continue.
|
||||
Log.w(TAG, "Ignoring edit list: Edited sample sequence does not contain a sync sample.");
|
||||
Util.scaleLargeTimestampsInPlace(timestamps, C.MICROS_PER_SECOND, track.timescale);
|
||||
return new TrackSampleTable(offsets, sizes, maximumSize, timestamps, flags);
|
||||
}
|
||||
|
||||
return new TrackSampleTable(editedOffsets, editedSizes, editedMaximumSize, editedTimestamps,
|
||||
|
Loading…
x
Reference in New Issue
Block a user