Title: [88945] trunk/Source/WebCore
Revision
88945
Author
jer.no...@apple.com
Date
2011-06-15 09:26:45 -0700 (Wed, 15 Jun 2011)

Log Message

2011-06-14  Jer Noble  <jer.no...@apple.com>

        Reviewed by Eric Carlson.

        (AVFoundation) Apple event video appears as live stream and is not seekable
        https://bugs.webkit.org/show_bug.cgi?id=62694

        No new tests; There are no media-player port specific tests yet.

        Work around a bug in apple.com live stream _javascript_ controller library.  When an AVAsset returns an indefinite time
        for its duration, return 0 if the asset has no tracks, and infinity otherwise.  This keeps the apple.com controller
        from identifying the stored stream as a live stream.

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (88944 => 88945)


--- trunk/Source/WebCore/ChangeLog	2011-06-15 16:18:55 UTC (rev 88944)
+++ trunk/Source/WebCore/ChangeLog	2011-06-15 16:26:45 UTC (rev 88945)
@@ -1,3 +1,19 @@
+2011-06-14  Jer Noble  <jer.no...@apple.com>
+
+        Reviewed by Eric Carlson.
+
+        (AVFoundation) Apple event video appears as live stream and is not seekable
+        https://bugs.webkit.org/show_bug.cgi?id=62694
+
+        No new tests; There are no media-player port specific tests yet.
+
+        Work around a bug in apple.com live stream _javascript_ controller library.  When an AVAsset returns an indefinite time
+        for its duration, return 0 if the asset has no tracks, and infinity otherwise.  This keeps the apple.com controller 
+        from identifying the stored stream as a live stream.
+
+        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration):
+
 2011-06-15  Andrey Kosyakov  <ca...@chromium.org>
 
        Unreviewed, rolled out r88937 (broke build on mac)

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm (88944 => 88945)


--- trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm	2011-06-15 16:18:55 UTC (rev 88944)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm	2011-06-15 16:26:45 UTC (rev 88945)
@@ -442,8 +442,12 @@
     if (CMTIME_IS_NUMERIC(cmDuration))
         return narrowPrecisionToFloat(CMTimeGetSeconds(cmDuration));
 
-    if (CMTIME_IS_INDEFINITE(cmDuration))
-        return numeric_limits<float>::infinity();
+    if (CMTIME_IS_INDEFINITE(cmDuration)) {
+        if (![[m_avAsset.get() tracks] count])
+            return 0;
+        else
+            return numeric_limits<float>::infinity();
+    }
 
     LOG(Media, "MediaPlayerPrivateAVFoundationObjC::platformDuration(%p) - invalid duration, returning %.0f", this, invalidTime());
     return invalidTime();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to