Changeset 263556 in webkit


Ignore:
Timestamp:
Jun 26, 2020 6:36:43 AM (4 years ago)
Author:
aboya@igalia.com
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:
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r263552 r263556  
     12020-06-26  Alicia Boya García  <aboya@igalia.com>
     2
     3        [GStreamer] Initialize m_currentState and m_oldState
     4        https://bugs.webkit.org/show_bug.cgi?id=213604
     5
     6        Reviewed by Eric Carlson.
     7
     8        MediaPlayerPrivateGStreamer was not initializing m_currentState and
     9        m_oldState, causing them to be checked e.g. updateStates() while they
     10        still contain garbage.
     11
     12        Because the biggest uninitialized usage is a != comparison, in
     13        practice things still worked, but that's still a bug. I detected the
     14        bug after seeing this in the logs:
     15
     16        playbin3SendSelectStreamsIfAppropriate:<media-player-0> Checking if to send SELECT_STREAMS, m_waitingForStreamsSelectedEvent = false, haveDifferentStreamIds = false, m_currentState = UNKNOWN!(-8421505)...  shouldSendSelectStreams = false
     17
     18        This patch fixes a slight memory error which doesn't alter
     19        TestExpectations.
     20
     21        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
     22
    1232020-06-25  Commit Queue  <commit-queue@webkit.org>
    224
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h

    r262695 r263556  
    342342    bool m_isPaused { true };
    343343    float m_playbackRate { 1 };
    344     GstState m_currentState;
    345     GstState m_oldState;
     344    GstState m_currentState { GST_STATE_NULL };
     345    GstState m_oldState { GST_STATE_NULL };
    346346    GstState m_requestedState { GST_STATE_VOID_PENDING };
    347347    bool m_shouldResetPipeline { false };
Note: See TracChangeset for help on using the changeset viewer.