MockRealtimeVideoSource::setFrameRateWithPreset should not use preset after moving it
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Oct 2019 18:42:17 +0000 (18:42 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Oct 2019 18:42:17 +0000 (18:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=202800

Reviewed by Alexey Proskuryakov.

This does not affect behavior right now since clients typically get the intrinsic size through media samples.
But this could create some inconsistencies.

* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::setFrameRateWithPreset):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp

index 982984b..4b7db5b 100644 (file)
@@ -1,3 +1,16 @@
+2019-10-10  youenn fablet  <youenn@apple.com>
+
+        MockRealtimeVideoSource::setFrameRateWithPreset should not use preset after moving it
+        https://bugs.webkit.org/show_bug.cgi?id=202800
+
+        Reviewed by Alexey Proskuryakov.
+
+        This does not affect behavior right now since clients typically get the intrinsic size through media samples.
+        But this could create some inconsistencies.
+
+        * platform/mock/MockRealtimeVideoSource.cpp:
+        (WebCore::MockRealtimeVideoSource::setFrameRateWithPreset):
+
 2019-10-10  Devin Rousso  <drousso@apple.com>
 
         Web Inspector: Timelines: don't call willDispatchEvent/didDispatchEvent unless there is a listener for the event
index 04ee3b4..9164873 100644 (file)
@@ -189,8 +189,8 @@ const RealtimeMediaSourceSettings& MockRealtimeVideoSource::settings()
 void MockRealtimeVideoSource::setFrameRateWithPreset(double, RefPtr<VideoPreset> preset)
 {
     m_preset = WTFMove(preset);
-    if (preset)
-        setIntrinsicSize(preset->size);
+    if (m_preset)
+        setIntrinsicSize(m_preset->size);
 }
 
 IntSize MockRealtimeVideoSource::captureSize() const