-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix parsing of multiple codecs when converting from AVC1 to AVCOTI
(cherry picked from commit 9c4eba9)
- Loading branch information
1 parent
1c8f055
commit b62c72d
Showing
3 changed files
with
38 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { expect } from 'chai'; | ||
import { convertAVC1ToAVCOTI } from '../../../src/utils/codecs'; | ||
|
||
describe('codecs', function () { | ||
it('convert codec string from AVC1 to AVCOTI', function () { | ||
expect(convertAVC1ToAVCOTI('avc1.66.30')).to.equal('avc1.42001e'); | ||
}); | ||
|
||
it('convert list of codecs string from AVC1 to AVCOTI', function () { | ||
expect(convertAVC1ToAVCOTI('avc1.77.30,avc1.66.30')).to.equal( | ||
'avc1.4d001e,avc1.42001e', | ||
); | ||
}); | ||
|
||
it('does not convert string if it is already converted', function () { | ||
expect(convertAVC1ToAVCOTI('avc1.64001E')).to.equal('avc1.64001E'); | ||
}); | ||
|
||
it('does not convert list of codecs string if it is already converted', function () { | ||
expect(convertAVC1ToAVCOTI('avc1.64001E,avc1.64001f')).to.equal( | ||
'avc1.64001E,avc1.64001f', | ||
); | ||
}); | ||
}); |