RESOLVED FIXED 213604
[GTK] Initialize m_currentState and m_oldState
https://bugs.webkit.org/show_bug.cgi?id=213604
Summary [GTK] Initialize m_currentState and m_oldState
Alicia Boya García
Reported 2020-06-25 07:53:11 PDT
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.
Attachments
Patch (2.22 KB, patch)
2020-06-25 08:13 PDT, Alicia Boya García
no flags
Patch for landing (2.22 KB, patch)
2020-06-26 06:15 PDT, Alicia Boya García
no flags
Alicia Boya García
Comment 1 2020-06-25 08:13:31 PDT
Alicia Boya García
Comment 2 2020-06-26 06:15:19 PDT
Created attachment 402858 [details] Patch for landing
EWS
Comment 3 2020-06-26 06:36:48 PDT
Committed r263556: <https://trac.webkit.org/changeset/263556> All reviewed patches have been landed. Closing bug and clearing flags on attachment 402858 [details].
Note You need to log in before you can comment on or make changes to this bug.