Bug 1143586: Part1. Be more relaxed when parsing h264 codecs' levels. r=cpearce

This commit is contained in:
Jean-Yves Avenard 2015-03-18 14:10:57 +11:00
parent 327385ac1e
commit 260aeead84

View File

@ -233,6 +233,12 @@ ExtractH264CodecDetails(const nsAString& aCodec,
aLevel = PromiseFlatString(Substring(aCodec, 9, 2)).ToInteger(&rv, 16);
NS_ENSURE_SUCCESS(rv, false);
if (aLevel == 9) {
aLevel = H264_LEVEL_1_b;
} else if (aLevel <= 5) {
aLevel *= 10;
}
// Capture the constraint_set flag value for the purpose of Telemetry.
// We don't NS_ENSURE_SUCCESS here because ExtractH264CodecDetails doesn't
// care about this, but we make sure constraints is above 4 (constraint_set5_flag)