[Webkit-unassigned] [Bug 213604] New: [GTK] Initialize m_currentState and m_oldState

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 25 07:53:11 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=213604

            Bug ID: 213604
           Summary: [GTK] Initialize m_currentState and m_oldState
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKitGTK
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: aboya at igalia.com
                CC: bugs-noreply at webkitgtk.org

While working on another issue I noticed this line in the log...

0:00:06.798920099    26 0x5644fb378ec0 DEBUG      webkitmediaplayer MediaPlayerPrivateGStreamer.cpp:1463:playbin3SendSelectStreamsIfAppropriate:<media-player-0> Checking if to send SELECT_STREAMS, m_waitingForStreamsSelectedEvent = false, haveDifferentStreamIds = false, m_currentState = UNKNOWN!(-8421505)... shouldSendSelectStreams = false

m_currentState is used before being initialized!

    GstState m_currentState;
    GstState m_oldState;

This is not only affecting a debug statement, but also affects updateStates():

    GstStateChangeReturn getStateResult = gst_element_get_state(m_pipeline.get(), &state, &pending, 250 * GST_NSECOND);
    if (state != m_currentState) {
        m_oldState = m_currentState;
        m_currentState = state;
        stateReallyChanged = true;
    }

This patch initializes both m_currentState and m_oldState to GST_STATE_NULL.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200625/81b8d7c9/attachment.htm>


More information about the webkit-unassigned mailing list