mirror of
https://github.com/samsonjs/media.git
synced 2026-04-05 11:15:46 +00:00
Fix NPE when listener is not set
PiperOrigin-RevId: 488970696
(cherry picked from commit f3ed9e359d)
This commit is contained in:
parent
73d40e1cfc
commit
c11b5cf91c
1 changed files with 5 additions and 3 deletions
|
|
@ -1000,9 +1000,11 @@ public final class DefaultAudioSink implements AudioSink {
|
|||
getSubmittedFrames() - trimmingAudioProcessor.getTrimmedFrameCount());
|
||||
if (!startMediaTimeUsNeedsSync
|
||||
&& Math.abs(expectedPresentationTimeUs - presentationTimeUs) > 200000) {
|
||||
listener.onAudioSinkError(
|
||||
new AudioSink.UnexpectedDiscontinuityException(
|
||||
presentationTimeUs, expectedPresentationTimeUs));
|
||||
if (listener != null) {
|
||||
listener.onAudioSinkError(
|
||||
new AudioSink.UnexpectedDiscontinuityException(
|
||||
presentationTimeUs, expectedPresentationTimeUs));
|
||||
}
|
||||
startMediaTimeUsNeedsSync = true;
|
||||
}
|
||||
if (startMediaTimeUsNeedsSync) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue