mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-03 13:53:53 +02:00
Add proper non-null check
This commit is contained in:
+1
-1
@@ -2095,7 +2095,7 @@ class AudioDecoderWrapper extends DecoderWrapper<AudioSample> {
|
|||||||
const sampleHandler = (sample: AudioSample) => {
|
const sampleHandler = (sample: AudioSample) => {
|
||||||
let sampleTimestamp = sample.timestamp;
|
let sampleTimestamp = sample.timestamp;
|
||||||
|
|
||||||
if (this.expectedFirstTimestamp && this.currentTimestamp === null) {
|
if (this.expectedFirstTimestamp !== null && this.currentTimestamp === null) {
|
||||||
this.timestampOffset = this.expectedFirstTimestamp - sampleTimestamp; ;
|
this.timestampOffset = this.expectedFirstTimestamp - sampleTimestamp; ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user