Commit 6c3c71b5 by olly Committed by Oliver Woodman

Fix SampleQueue splicing when sampleOffsetUs != 0

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212432661
parent ba8c22ab
......@@ -577,13 +577,13 @@ public final class SampleQueue implements TrackOutput {
if (pendingFormatAdjustment) {
format(lastUnadjustedFormat);
}
timeUs += sampleOffsetUs;
if (pendingSplice) {
if ((flags & C.BUFFER_FLAG_KEY_FRAME) == 0 || !metadataQueue.attemptSplice(timeUs)) {
return;
}
pendingSplice = false;
}
timeUs += sampleOffsetUs;
long absoluteOffset = totalBytesWritten - size - offset;
metadataQueue.commitSample(timeUs, flags, absoluteOffset, size, cryptoData);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment