Skip to content

Commit

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

// biome-ignore lint/style/noNonNullAssertion: this will never happen with our media stream
this._pts = combineLoHi(ptshi!, pts!) / time_base_den! * time_base_num! * 1000;
if (this._startPts === undefined)
this._startPts = this._pts;
this.emit("pts", this._pts);

const sendTime = end_sendFrame - start_sendFrame;
Expand All @@ -119,7 +117,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;
if (this._noSleep)
{
callback(null);
Expand Down

0 comments on commit bb5decc

Please sign in to comment.