mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Temporary fix for gapless regression for MP3.
PiperOrigin-RevId: 315334491
This commit is contained in:
parent
b1e56304a1
commit
83758577e3
@ -1391,8 +1391,15 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
|
|||||||
formatQueue.add(presentationTimeUs, inputFormat);
|
formatQueue.add(presentationTimeUs, inputFormat);
|
||||||
waitingForFirstSampleInFormat = false;
|
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();
|
buffer.flip();
|
||||||
if (buffer.hasSupplementalData()) {
|
if (buffer.hasSupplementalData()) {
|
||||||
handleInputBufferSupplementalData(buffer);
|
handleInputBufferSupplementalData(buffer);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user