Title: [164177] trunk/Source/WebCore
Revision
164177
Author
[email protected]
Date
2014-02-15 11:25:49 -0800 (Sat, 15 Feb 2014)

Log Message

[Win] Avoid unnecessary asserts if "prepareToPlay" is called multiple times.
https://bugs.webkit.org/show_bug.cgi?id=128859

Reviewed by Eric Carlson.

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::createPlayer): Don't assert if player exists; just return the
existing copy.
(WebCore::AVFWrapper::createPlayerItem): Ditto (but with Player Items).

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (164176 => 164177)


--- trunk/Source/WebCore/ChangeLog	2014-02-15 18:16:24 UTC (rev 164176)
+++ trunk/Source/WebCore/ChangeLog	2014-02-15 19:25:49 UTC (rev 164177)
@@ -1,3 +1,15 @@
+2014-02-15  Brent Fulgham  <[email protected]>
+
+        [Win] Avoid unnecessary asserts if "prepareToPlay" is called multiple times.
+        https://bugs.webkit.org/show_bug.cgi?id=128859
+
+        Reviewed by Eric Carlson.
+
+        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
+        (WebCore::AVFWrapper::createPlayer): Don't assert if player exists; just return the
+        existing copy.
+        (WebCore::AVFWrapper::createPlayerItem): Ditto (but with Player Items).
+
 2014-02-15  Darin Adler  <[email protected]>
 
         Remove double hashing from DatasetDOMStringMap::deleteItem

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp (164176 => 164177)


--- trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp	2014-02-15 18:16:24 UTC (rev 164176)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp	2014-02-15 19:25:49 UTC (rev 164177)
@@ -1312,8 +1312,11 @@
 {
     ASSERT(isMainThread());
     ASSERT(dispatch_get_main_queue() == dispatch_get_current_queue());
-    ASSERT(!avPlayer() && avPlayerItem());
+    ASSERT(avPlayerItem());
 
+    if (avPlayer())
+        return;
+
     RetainPtr<CFMutableDictionaryRef> optionsRef = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
 
     if (d3dDevice) {
@@ -1355,8 +1358,11 @@
 {
     ASSERT(isMainThread());
     ASSERT(dispatch_get_main_queue() == dispatch_get_current_queue());
-    ASSERT(!avPlayerItem() && avAsset());
+    ASSERT(avAsset());
 
+    if (avPlayerItem())
+        return;
+
     // Create the player item so we begin loading media data.
     AVCFPlayerItemRef itemRef = AVCFPlayerItemCreateWithAsset(kCFAllocatorDefault, avAsset(), m_notificationQueue);
     m_avPlayerItem = adoptCF(itemRef);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to