Skip to content

Commit

Permalink
fix: Fix normalized codec for VP9 (#7645)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad authored Nov 22, 2024
1 parent 87f6aa6 commit f2061e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/util/mime_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ shaka.util.MimeUtils = class {
return 'dtsx'; // DTS:X
case base === 'mp4a' && profile === 'a9':
return 'dtsc'; // DTS Digital Surround
case base === 'vp09':
return 'vp9';
case base === 'avc1':
case base === 'avc3':
return 'avc'; // H264
Expand Down
3 changes: 3 additions & 0 deletions test/util/mime_utils_unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ describe('MimeUtils', () => {
expect(getNormalizedCodec('vp8')).toBe('vp8');
expect(getNormalizedCodec('vp8.0')).toBe('vp8');

expect(getNormalizedCodec('vp9')).toBe('vp9');
expect(getNormalizedCodec('vp09')).toBe('vp9');

expect(getNormalizedCodec('avc1')).toBe('avc');
expect(getNormalizedCodec('avc3')).toBe('avc');

Expand Down

0 comments on commit f2061e4

Please sign in to comment.