Title: [216432] trunk/Source/WebCore
Revision
216432
Author
commit-qu...@webkit.org
Date
2017-05-08 10:31:54 -0700 (Mon, 08 May 2017)

Log Message

CoreAudioCaptureSource should not modify its shared unit if already started/stopped
https://bugs.webkit.org/show_bug.cgi?id=171804

Patch by Youenn Fablet <you...@apple.com> on 2017-05-08
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.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (216431 => 216432)


--- trunk/Source/WebCore/ChangeLog	2017-05-08 17:20:54 UTC (rev 216431)
+++ trunk/Source/WebCore/ChangeLog	2017-05-08 17:31:54 UTC (rev 216432)
@@ -1,3 +1,16 @@
+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-08  Antti Koivisto  <an...@apple.com>
 
         ComposedTreeIterator does not traverse all slotted children if the traversal root is a slot element.

Modified: trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp (216431 => 216432)


--- trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp	2017-05-08 17:20:54 UTC (rev 216431)
+++ trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp	2017-05-08 17:31:54 UTC (rev 216432)
@@ -622,6 +622,9 @@
 
 void CoreAudioCaptureSource::startProducingData()
 {
+    if (m_isProducingData)
+        return;
+
 #if PLATFORM(IOS)
     coreAudioCaptureSourceFactory().setActiveSource(*this);
 #endif
@@ -640,6 +643,9 @@
 
 void CoreAudioCaptureSource::stopProducingData()
 {
+    if (!m_isProducingData)
+        return;
+    
     CoreAudioSharedUnit::singleton().stopProducingData();
     m_isProducingData = false;
     m_muted = false;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to