Title: [271086] trunk/Source/WebCore
Revision
271086
Author
[email protected]
Date
2020-12-25 21:39:28 -0800 (Fri, 25 Dec 2020)

Log Message

REGRESSION (r270662): SourceBufferParserWebM leaks CMSampleBufferRefs
https://bugs.webkit.org/show_bug.cgi?id=220144

Reviewed by Anders Carlsson.

* platform/graphics/cocoa/SourceBufferParserWebM.cpp:
(WebCore::SourceBufferParserWebM::VideoTrackData::createSampleBuffer):
(WebCore::SourceBufferParserWebM::AudioTrackData::createSampleBuffer): Move the RetainPtr
holding an adopted CMSampleBufferRef rather than leaking it when calling provideMediaData.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (271085 => 271086)


--- trunk/Source/WebCore/ChangeLog	2020-12-25 21:46:14 UTC (rev 271085)
+++ trunk/Source/WebCore/ChangeLog	2020-12-26 05:39:28 UTC (rev 271086)
@@ -1,3 +1,15 @@
+2020-12-25  Andy Estes  <[email protected]>
+
+        REGRESSION (r270662): SourceBufferParserWebM leaks CMSampleBufferRefs
+        https://bugs.webkit.org/show_bug.cgi?id=220144
+
+        Reviewed by Anders Carlsson.
+
+        * platform/graphics/cocoa/SourceBufferParserWebM.cpp:
+        (WebCore::SourceBufferParserWebM::VideoTrackData::createSampleBuffer):
+        (WebCore::SourceBufferParserWebM::AudioTrackData::createSampleBuffer): Move the RetainPtr
+        holding an adopted CMSampleBufferRef rather than leaking it when calling provideMediaData.
+
 2020-12-25  Zalan Bujtas  <[email protected]>
 
         [LFC][Integration] Use the pre-computed geometries for the inline level boxes

Modified: trunk/Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp (271085 => 271086)


--- trunk/Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp	2020-12-25 21:46:14 UTC (rev 271085)
+++ trunk/Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp	2020-12-26 05:39:28 UTC (rev 271086)
@@ -1108,7 +1108,7 @@
     }
 
     auto trackID = track.track_uid.value();
-    parser().provideMediaData(sampleBuffer.leakRef(), trackID, metadata.position);
+    parser().provideMediaData(WTFMove(sampleBuffer), trackID, metadata.position);
 #else
     UNUSED_PARAM(presentationTime);
     UNUSED_PARAM(sampleCount);
@@ -1210,7 +1210,7 @@
     m_packetDescriptions.clear();
 
     auto trackID = track().track_uid.value();
-    parser().provideMediaData(sampleBuffer.leakRef(), trackID, latestByteRangeOffset);
+    parser().provideMediaData(WTFMove(sampleBuffer), trackID, latestByteRangeOffset);
 }
 
 void SourceBufferParserWebM::flushPendingAudioBuffers()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to