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 Aug 8, 2024
1 parent d93a019 commit 01545f4
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 @@ -2004,7 +2004,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 @@ -2046,7 +2046,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 @@ -2105,7 +2105,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 @@ -2132,7 +2132,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 01545f4

Please sign in to comment.