Title: [165637] trunk/Source/WebCore
Revision
165637
Author
bfulg...@apple.com
Date
2014-03-14 12:49:35 -0700 (Fri, 14 Mar 2014)

Log Message

Crash when using a mixture of In-Band and Out-of-Band Tracks
https://bugs.webkit.org/show_bug.cgi?id=130247

Reviewed by Eric Carlson.

* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::processNewAndRemovedTextTracks): Do not include
the new Out-of-Band placeholder tracks in our counts of in-band tracks.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (165636 => 165637)


--- trunk/Source/WebCore/ChangeLog	2014-03-14 19:36:35 UTC (rev 165636)
+++ trunk/Source/WebCore/ChangeLog	2014-03-14 19:49:35 UTC (rev 165637)
@@ -1,3 +1,14 @@
+2014-03-14  Brent Fulgham  <bfulg...@apple.com>
+
+        Crash when using a mixture of In-Band and Out-of-Band Tracks
+        https://bugs.webkit.org/show_bug.cgi?id=130247
+
+        Reviewed by Eric Carlson.
+
+        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
+        (WebCore::MediaPlayerPrivateAVFoundation::processNewAndRemovedTextTracks): Do not include
+        the new Out-of-Band placeholder tracks in our counts of in-band tracks.
+
 2014-03-13  Ryosuke Niwa  <rn...@webkit.org>
 
         [Mac] Avoid creating DOMCSSStyleDeclaration in WebHTMLConverter

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp (165636 => 165637)


--- trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp	2014-03-14 19:36:35 UTC (rev 165636)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp	2014-03-14 19:49:35 UTC (rev 165637)
@@ -966,11 +966,18 @@
             m_textTracks.remove(i);
         }
     }
-    
+
+    unsigned inBandCount = 0;
     for (unsigned i = 0; i < m_textTracks.size(); ++i) {
         RefPtr<InbandTextTrackPrivateAVF> track = m_textTracks[i];
-        
-        track->setTextTrackIndex(i);
+
+#if ENABLE(AVF_CAPTIONS)
+        if (track->textTrackCategory() == InbandTextTrackPrivateAVF::OutOfBand)
+            continue;
+#endif
+
+        track->setTextTrackIndex(inBandCount);
+        ++inBandCount;
         if (track->hasBeenReported())
             continue;
         
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to