Skip to content

Commit

Permalink
Simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
longnguyen2004 committed Jan 25, 2025
1 parent bb5decc commit 243a04c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/media/BaseMediaStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,8 @@ export class BaseMediaStream extends Writable {
}

const end_write = performance.now();
if (this._startTime === undefined)
this._startTime = start_write;
if (this._startPts === undefined)
this._startPts = this._pts;
this._startTime ??= start_write;
this._startPts ??= this._pts;
if (this._noSleep)
{
callback(null);
Expand Down

0 comments on commit 243a04c

Please sign in to comment.