Commit 1f2126a7 authored by George Burgess IV's avatar George Burgess IV Committed by Commit Bot

mediastream: fix an implicit conversion warning

The warning is upset that we're comparing a double,
`ConstraintMax(constraint)`, against an enum,
`media::limits::kMaxFramesPerSecond`. Casting makes it happy.

Bug: 1058218
Change-Id: Ib96907e200228ffc28260d4e3de03e767c9352af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2096028Reviewed-by: default avatarHenrik Boström <hbos@chromium.org>
Commit-Queue: George Burgess <gbiv@chromium.org>
Cr-Commit-Position: refs/heads/master@{#749288}
parent 8cca7fc5
......@@ -352,9 +352,10 @@ class CandidateFormat {
bool SatisfiesFrameRateConstraint(const DoubleConstraint& constraint) {
double constraint_min =
ConstraintHasMin(constraint) ? ConstraintMin(constraint) : -1.0;
double constraint_max = ConstraintHasMax(constraint)
? ConstraintMax(constraint)
: media::limits::kMaxFramesPerSecond;
double constraint_max =
ConstraintHasMax(constraint)
? ConstraintMax(constraint)
: static_cast<double>(media::limits::kMaxFramesPerSecond);
bool constraint_min_out_of_range =
((constraint_min > NativeFrameRate()) ||
(constraint_min > MaxFrameRateConstraint().value_or(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment