Title: [211399] trunk/Source/WebCore
Revision
211399
Author
akl...@apple.com
Date
2017-01-30 18:12:06 -0800 (Mon, 30 Jan 2017)

Log Message

Fix CMSampleBuffer leak in MediaSampleAVFObjC::createNonDisplayingCopy().
<https://webkit.org/b/167621>

Reviewed by Andy Estes.

We were failing to adopt the CMSampleBuffer after copying it. Seen on leaks bot.

* platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
(WebCore::MediaSampleAVFObjC::createNonDisplayingCopy):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (211398 => 211399)


--- trunk/Source/WebCore/ChangeLog	2017-01-31 01:54:02 UTC (rev 211398)
+++ trunk/Source/WebCore/ChangeLog	2017-01-31 02:12:06 UTC (rev 211399)
@@ -1,3 +1,15 @@
+2017-01-30  Andreas Kling  <akl...@apple.com>
+
+        Fix CMSampleBuffer leak in MediaSampleAVFObjC::createNonDisplayingCopy().
+        <https://webkit.org/b/167621>
+
+        Reviewed by Andy Estes.
+
+        We were failing to adopt the CMSampleBuffer after copying it. Seen on leaks bot.
+
+        * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
+        (WebCore::MediaSampleAVFObjC::createNonDisplayingCopy):
+
 2017-01-30  Andy Estes  <aes...@apple.com>
 
         [QuickLook] QLPreviewConverter and QuickLookHandle have different lifetime requirements

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm (211398 => 211399)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm	2017-01-31 01:54:02 UTC (rev 211398)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm	2017-01-31 02:12:06 UTC (rev 211399)
@@ -229,7 +229,7 @@
         CFDictionarySetValue(attachments, kCMSampleAttachmentKey_DoNotDisplay, kCFBooleanTrue);
     }
 
-    return MediaSampleAVFObjC::create(newSampleBuffer, m_id);
+    return MediaSampleAVFObjC::create(adoptCF(newSampleBuffer).get(), m_id);
 }
 
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to