Title: [263556] trunk/Source/WebCore
Revision
263556
Author
[email protected]
Date
2020-06-26 06:36:43 -0700 (Fri, 26 Jun 2020)

Log Message

[GStreamer] Initialize m_currentState and m_oldState
https://bugs.webkit.org/show_bug.cgi?id=213604

Reviewed by Eric Carlson.

MediaPlayerPrivateGStreamer was not initializing m_currentState and
m_oldState, causing them to be checked e.g. updateStates() while they
still contain garbage.

Because the biggest uninitialized usage is a != comparison, in
practice things still worked, but that's still a bug. I detected the
bug after seeing this in the logs:

playbin3SendSelectStreamsIfAppropriate:<media-player-0> Checking if to send SELECT_STREAMS, m_waitingForStreamsSelectedEvent = false, haveDifferentStreamIds = false, m_currentState = UNKNOWN!(-8421505)...  shouldSendSelectStreams = false

This patch fixes a slight memory error which doesn't alter
TestExpectations.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (263555 => 263556)


--- trunk/Source/WebCore/ChangeLog	2020-06-26 09:38:21 UTC (rev 263555)
+++ trunk/Source/WebCore/ChangeLog	2020-06-26 13:36:43 UTC (rev 263556)
@@ -1,3 +1,25 @@
+2020-06-26  Alicia Boya GarcĂ­a  <[email protected]>
+
+        [GStreamer] Initialize m_currentState and m_oldState
+        https://bugs.webkit.org/show_bug.cgi?id=213604
+
+        Reviewed by Eric Carlson.
+
+        MediaPlayerPrivateGStreamer was not initializing m_currentState and
+        m_oldState, causing them to be checked e.g. updateStates() while they
+        still contain garbage.
+
+        Because the biggest uninitialized usage is a != comparison, in
+        practice things still worked, but that's still a bug. I detected the
+        bug after seeing this in the logs:
+
+        playbin3SendSelectStreamsIfAppropriate:<media-player-0> Checking if to send SELECT_STREAMS, m_waitingForStreamsSelectedEvent = false, haveDifferentStreamIds = false, m_currentState = UNKNOWN!(-8421505)...  shouldSendSelectStreams = false
+
+        This patch fixes a slight memory error which doesn't alter
+        TestExpectations.
+
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
+
 2020-06-25  Commit Queue  <[email protected]>
 
         Unreviewed, reverting r263537.

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h (263555 => 263556)


--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h	2020-06-26 09:38:21 UTC (rev 263555)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h	2020-06-26 13:36:43 UTC (rev 263556)
@@ -341,8 +341,8 @@
     mutable bool m_isLiveStream { false };
     bool m_isPaused { true };
     float m_playbackRate { 1 };
-    GstState m_currentState;
-    GstState m_oldState;
+    GstState m_currentState { GST_STATE_NULL };
+    GstState m_oldState { GST_STATE_NULL };
     GstState m_requestedState { GST_STATE_VOID_PENDING };
     bool m_shouldResetPipeline { false };
     bool m_isSeeking { false };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to