mirror of
https://github.com/samsonjs/media.git
synced 2026-04-08 11:45:51 +00:00
Fix NPE when listener is not set
PiperOrigin-RevId: 488970696
(cherry picked from commit f52bb274b8)
This commit is contained in:
parent
97d7ed7dce
commit
e2e7c43ca0
1 changed files with 5 additions and 3 deletions
|
|
@ -991,9 +991,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