mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 04:09:50 +00:00
Bug 1912680 - Don't reject invalid h264 codec string, and pretend Firefox can play them. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D220278
This commit is contained in:
parent
26c33120bf
commit
fd5175e475
@ -487,17 +487,7 @@ bool ExtractH264CodecDetails(const nsAString& aCodec, uint8_t& aProfile,
|
||||
level *= 10;
|
||||
}
|
||||
|
||||
// Check if valid level value
|
||||
aLevel = static_cast<H264_LEVEL>(level);
|
||||
if (aLevel < H264_LEVEL::H264_LEVEL_1 ||
|
||||
aLevel > H264_LEVEL::H264_LEVEL_6_2) {
|
||||
return false;
|
||||
}
|
||||
if ((level % 10) > 2) {
|
||||
if (level != 13) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -57,6 +57,9 @@ function check_mp4(v, enabled) {
|
||||
// H.264 High Profile Level 3.1, AAC-LC
|
||||
check("video/mp4; codecs=\"avc1.64001F, mp4a.40.2\"", "probably");
|
||||
|
||||
// Bogus H.264 level, return "probably" for web compat reasons
|
||||
check("video/mp4; codecs=\"avc1.4D401D, mp4a.40.2\"", "probably");
|
||||
|
||||
check("video/mp4; codecs=\"avc1.42E01E\"", "probably");
|
||||
check("video/mp4; codecs=\"avc1.42001E\"", "probably");
|
||||
check("video/mp4; codecs=\"avc1.58A01E\"", "probably");
|
||||
|
Loading…
x
Reference in New Issue
Block a user