Title: [216773] branches/safari-604.1.21-branch/Source/WebCore
Revision
216773
Author
matthew_han...@apple.com
Date
2017-05-12 12:10:18 -0700 (Fri, 12 May 2017)

Log Message

Cherry-pick r216432. rdar://problem/32051782

Modified Paths

Diff

Modified: branches/safari-604.1.21-branch/Source/WebCore/ChangeLog (216772 => 216773)


--- branches/safari-604.1.21-branch/Source/WebCore/ChangeLog	2017-05-12 18:48:07 UTC (rev 216772)
+++ branches/safari-604.1.21-branch/Source/WebCore/ChangeLog	2017-05-12 19:10:18 UTC (rev 216773)
@@ -1,3 +1,20 @@
+2017-05-12  Matthew Hanson  <matthew_han...@apple.com>
+
+        Cherry-pick r216432. rdar://problem/32051782
+
+    2017-05-08  Youenn Fablet  <you...@apple.com>
+
+            CoreAudioCaptureSource should not modify its shared unit if already started/stopped
+            https://bugs.webkit.org/show_bug.cgi?id=171804
+
+            Reviewed by Jer Noble.
+
+            Manual testing only since CoreAudioSharedUnit is not mocked.
+
+            * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
+            (WebCore::CoreAudioCaptureSource::startProducingData): Exit early if source is already started.
+            (WebCore::CoreAudioCaptureSource::stopProducingData): Exit early if source is already stopped.
+
 2017-05-11  Jason Marcell  <jmarc...@apple.com>
 
         Cherry-pick r216691. rdar://problem/32136567

Modified: branches/safari-604.1.21-branch/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp (216772 => 216773)


--- branches/safari-604.1.21-branch/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp	2017-05-12 18:48:07 UTC (rev 216772)
+++ branches/safari-604.1.21-branch/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp	2017-05-12 19:10:18 UTC (rev 216773)
@@ -667,6 +667,9 @@
 
 void CoreAudioCaptureSource::startProducingData()
 {
+    if (m_isProducingData)
+        return;
+
     CoreAudioSharedUnit::singleton().startProducingData();
     m_isProducingData = CoreAudioSharedUnit::singleton().isProducingData();
 
@@ -681,6 +684,9 @@
 
 void CoreAudioCaptureSource::stopProducingData()
 {
+    if (!m_isProducingData)
+        return;
+    
     CoreAudioSharedUnit::singleton().stopProducingData();
     m_isProducingData = false;
     m_muted = true;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to