Skip to content

Commit

Permalink
[v3] Treat codecs beginning with hev1 as hevc
Browse files Browse the repository at this point in the history
This is a backport of #1499 to the v3
  • Loading branch information
peaBerberian committed Sep 6, 2024
1 parent bce7633 commit f72049d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/utils/are_codecs_compatible.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ function areCodecsCompatible(a: string, b: string): boolean {

const codecA = codecsA.substring(7);
const codecB = codecsB.substring(7);
if (codecA.split(".")[0] !== codecB.split(".")[0]) {
let initialPartA = codecA.split(".")[0];
initialPartA = initialPartA === "hev1" ? "hvc1" : initialPartA;
let initialPartB = codecB.split(".")[0];
initialPartB = initialPartB === "hev1" ? "hvc1" : initialPartB;
if (initialPartA !== initialPartB) {
return false;
}

Expand Down

0 comments on commit f72049d

Please sign in to comment.