Title: [97093] trunk/Source/WebCore
Revision
97093
Author
jer.no...@apple.com
Date
2011-10-10 15:01:38 -0700 (Mon, 10 Oct 2011)

Log Message

media/video-loop.html is failing on Lion because of negative currentTime()
https://bugs.webkit.org/show_bug.cgi?id=69468

Reviewed by Darin Adler.

No new tests. Covered by media/video-loop.html test.

AVFoundation will occasionally return small, negative current times during loop operations.
Clean up these negative times before returning the currentTime.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (97092 => 97093)


--- trunk/Source/WebCore/ChangeLog	2011-10-10 21:46:22 UTC (rev 97092)
+++ trunk/Source/WebCore/ChangeLog	2011-10-10 22:01:38 UTC (rev 97093)
@@ -1,3 +1,18 @@
+2011-10-06  Jer Noble  <jer.no...@apple.com>
+
+        media/video-loop.html is failing on Lion because of negative currentTime()
+        https://bugs.webkit.org/show_bug.cgi?id=69468
+
+        Reviewed by Darin Adler.
+
+        No new tests. Covered by media/video-loop.html test.
+
+        AVFoundation will occasionally return small, negative current times during loop operations.
+        Clean up these negative times before returning the currentTime.
+
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime):
+
 2011-10-10  Jeremy Apthorp  <jere...@chromium.org>
 
         Exiting fullscreen shouldn't crash if the element that was fullscreened

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (97092 => 97093)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2011-10-10 21:46:22 UTC (rev 97092)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2011-10-10 22:01:38 UTC (rev 97093)
@@ -430,8 +430,9 @@
         return 0;
 
     CMTime itemTime = [m_avPlayerItem.get() currentTime];
-    if (CMTIME_IS_NUMERIC(itemTime))
-        return narrowPrecisionToFloat(CMTimeGetSeconds(itemTime));
+    if (CMTIME_IS_NUMERIC(itemTime)) {
+        return max(narrowPrecisionToFloat(CMTimeGetSeconds(itemTime)), 0.0f);
+    }
 
     return 0;
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to