mirror of
https://github.com/androidx/media.git
synced 2025-05-08 16:10:38 +08:00
Fix NPE when listener is not set
PiperOrigin-RevId: 488970696
This commit is contained in:
parent
bae509009b
commit
f3ed9e359d
@ -900,9 +900,11 @@ public final class DefaultAudioSink implements AudioSink {
|
||||
getSubmittedFrames() - trimmingAudioProcessor.getTrimmedFrameCount());
|
||||
if (!startMediaTimeUsNeedsSync
|
||||
&& Math.abs(expectedPresentationTimeUs - presentationTimeUs) > 200000) {
|
||||
if (listener != null) {
|
||||
listener.onAudioSinkError(
|
||||
new AudioSink.UnexpectedDiscontinuityException(
|
||||
presentationTimeUs, expectedPresentationTimeUs));
|
||||
}
|
||||
startMediaTimeUsNeedsSync = true;
|
||||
}
|
||||
if (startMediaTimeUsNeedsSync) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user