Skip to content

Commit

Permalink
Rename pushParameterSet method and sets argument
Browse files Browse the repository at this point in the history
  • Loading branch information
robwalch committed Jan 7, 2025
1 parent 0896910 commit 2a30887
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/demux/video/hevc-video-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class HevcVideoParser extends BaseVideoParser {
track.params[prop] = config.params[prop];
}
}
this.pushPPSorSPS(track.sps, unit.data, track.vps);
this.pushParameterSet(track.sps, unit.data, track.vps);
if (!VideoSample) {
VideoSample = this.VideoSample = this.createVideoSample(
true,
Expand All @@ -180,7 +180,7 @@ class HevcVideoParser extends BaseVideoParser {
track.params[prop] = config[prop];
}
}
this.pushPPSorSPS(track.pps, unit.data, track.vps);
this.pushParameterSet(track.pps, unit.data, track.vps);
}
break;

Expand Down Expand Up @@ -217,13 +217,13 @@ class HevcVideoParser extends BaseVideoParser {
}
}

private pushPPSorSPS(
ppsOrSps: Uint8Array[],
private pushParameterSet(
parameterSets: Uint8Array[],
data: Uint8Array,
vps: Uint8Array[] | undefined,
) {
if ((vps && vps[0] === this.initVPS) || (!vps && !ppsOrSps.length)) {
ppsOrSps.push(data);
if ((vps && vps[0] === this.initVPS) || (!vps && !parameterSets.length)) {
parameterSets.push(data);
}
}

Expand Down

0 comments on commit 2a30887

Please sign in to comment.