[webkit-reviews] review granted: [Bug 114484] Add support for MediaPlayer::minTimeSeekable() : [Attachment 197705] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 12 10:01:30 PDT 2013


Eric Carlson <eric.carlson at apple.com> has granted Jer Noble
<jer.noble at apple.com>'s request for review:
Bug 114484: Add support for MediaPlayer::minTimeSeekable()
https://bugs.webkit.org/show_bug.cgi?id=114484

Attachment 197705: Patch
https://bugs.webkit.org/attachment.cgi?id=197705&action=review

------- Additional Comments from Eric Carlson <eric.carlson at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=197705&action=review


>
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundati
onObjC.mm:696
> +    double minTimeSeekable = std::numeric_limits<double>::infinity();
> +    for (NSValue *thisRangeValue in seekableRanges) {
> +	   CMTimeRange timeRange = [thisRangeValue CMTimeRangeValue];
> +	   if (!CMTIMERANGE_IS_VALID(timeRange) ||
CMTIMERANGE_IS_EMPTY(timeRange))
> +	       continue;
> +
> +	   double startOfRange = CMTimeGetSeconds(timeRange.start);
> +	   if (minTimeSeekable > startOfRange)
> +	       minTimeSeekable = startOfRange;
> +    }
> +    return minTimeSeekable;

infinity() is probably not the right value to return if seekableRanges is not
empty, but does not have any valid ranges. Definitely an edge case, but
probably worth special casing.


More information about the webkit-reviews mailing list