Skip to content

Commit

Permalink
fix: Compare normalized codecs in codec switching checks (#7143)
Browse files Browse the repository at this point in the history
Resolves #7140.
  • Loading branch information
willdharris authored and avelad committed Aug 19, 2024
1 parent afdf7c6 commit bfa8caa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/media/media_source_engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -2012,7 +2012,7 @@ shaka.media.MediaSourceEngine = class {
return false;
}
const MimeUtils = shaka.util.MimeUtils;
const currentCodec = MimeUtils.getCodecBase(
const currentCodec = MimeUtils.getNormalizedCodec(
MimeUtils.getCodecs(this.sourceBufferTypes_[contentType]));
const currentBasicType = MimeUtils.getBasicType(
this.sourceBufferTypes_[contentType]);
Expand Down Expand Up @@ -2054,7 +2054,7 @@ shaka.media.MediaSourceEngine = class {
}
}

const newCodec = MimeUtils.getCodecBase(
const newCodec = MimeUtils.getNormalizedCodec(
MimeUtils.getCodecs(newMimeType));
const newBasicType = MimeUtils.getBasicType(newMimeType);

Expand Down Expand Up @@ -2113,7 +2113,7 @@ shaka.media.MediaSourceEngine = class {
return false;
}
const MimeUtils = shaka.util.MimeUtils;
const currentCodec = MimeUtils.getCodecBase(
const currentCodec = MimeUtils.getNormalizedCodec(
MimeUtils.getCodecs(this.sourceBufferTypes_[contentType]));
const currentBasicType = MimeUtils.getBasicType(
this.sourceBufferTypes_[contentType]);
Expand All @@ -2140,7 +2140,7 @@ shaka.media.MediaSourceEngine = class {
}
}

const newCodec = MimeUtils.getCodecBase(
const newCodec = MimeUtils.getNormalizedCodec(
MimeUtils.getCodecs(newMimeType));
const newBasicType = MimeUtils.getBasicType(newMimeType);

Expand Down

0 comments on commit bfa8caa

Please sign in to comment.