mirror of
https://github.com/samsonjs/media.git
synced 2026-04-14 12:45:47 +00:00
Temporary fix for gapless regression for MP3.
PiperOrigin-RevId: 315334491
This commit is contained in:
parent
b1e56304a1
commit
83758577e3
1 changed files with 8 additions and 1 deletions
|
|
@ -1391,8 +1391,15 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
|
|||
formatQueue.add(presentationTimeUs, inputFormat);
|
||||
waitingForFirstSampleInFormat = false;
|
||||
}
|
||||
largestQueuedPresentationTimeUs = Math.max(largestQueuedPresentationTimeUs, presentationTimeUs);
|
||||
|
||||
// TODO(b/158483277): Find the root cause of why a gap is introduced in MP3 playback when using
|
||||
// presentationTimeUs from the c2Mp3TimestampTracker.
|
||||
if (c2Mp3TimestampTracker != null) {
|
||||
largestQueuedPresentationTimeUs = Math.max(largestQueuedPresentationTimeUs, buffer.timeUs);
|
||||
} else {
|
||||
largestQueuedPresentationTimeUs =
|
||||
Math.max(largestQueuedPresentationTimeUs, presentationTimeUs);
|
||||
}
|
||||
buffer.flip();
|
||||
if (buffer.hasSupplementalData()) {
|
||||
handleInputBufferSupplementalData(buffer);
|
||||
|
|
|
|||
Loading…
Reference in a new issue