Do not pass nil when initializing legible output
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Jan 2013 16:33:45 +0000 (16:33 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Jan 2013 16:33:45 +0000 (16:33 +0000)
https://bugs.webkit.org/show_bug.cgi?id=106799

Reviewed by Jessie Berlin.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): -[AVPlayerItemLegibleOutput initWithDependencyFactory:mediaSubtypesForNativeRepresentation:]
    wants an empty NSArray rather than nil.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139615 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm

index 39cdb45..4a37d68 100644 (file)
@@ -1,3 +1,14 @@
+2013-01-14  Eric Carlson  <eric.carlson@apple.com>
+
+        Do not pass nil when initializing legible output
+        https://bugs.webkit.org/show_bug.cgi?id=106799
+
+        Reviewed by Jessie Berlin.
+
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): -[AVPlayerItemLegibleOutput initWithDependencyFactory:mediaSubtypesForNativeRepresentation:]
+            wants an empty NSArray rather than nil.
+
 2013-01-14  Andrey Adaikin  <aandrey@chromium.org>
 
         Web Inspector: [Canvas] UI: add control buttons for doing the replay steps
index 98956db..a03e915 100644 (file)
@@ -888,7 +888,7 @@ void MediaPlayerPrivateAVFoundationObjC::tracksChanged()
 
 #if HAVE(AVFOUNDATION_TEXT_TRACK_SUPPORT)
     if (m_avPlayerItem && !m_legibleOutput) {
-        m_legibleOutput = adoptNS([[AVPlayerItemLegibleOutput alloc] initWithMediaSubtypesForNativeRepresentation:nil]);
+        m_legibleOutput = adoptNS([[AVPlayerItemLegibleOutput alloc] initWithMediaSubtypesForNativeRepresentation:[NSArray array]]);
         [m_legibleOutput.get() setSuppressesPlayerRendering:YES];
 
         // We enabled automatic media selection because we want alternate audio tracks to be enabled/disabled automatically,