diff --git a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java index 84538b8122b..e527f310b30 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java @@ -395,7 +395,11 @@ public static TrackSampleTable parseStbl(Track track, Atom.ContainerAtom stblAto 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,