Initialize trackTypeAsString for call to GST_INFO_OBJECT() in TrackType::Text
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Apr 2019 10:21:03 +0000 (10:21 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Apr 2019 10:21:03 +0000 (10:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196350

Patch by Eike Rathke <erack@redhat.com> on 2019-04-09
Reviewed by Xabier Rodriguez-Calvar.

trackTypeAsString was uninitialized in the
TrackPrivateBaseGStreamer::TrackType::Text case when calling
GST_INFO_OBJECT().

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::enableTrack):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

index ba4c0a3..b308ba5 100644 (file)
@@ -1,3 +1,17 @@
+2019-04-09  Eike Rathke  <erack@redhat.com>
+
+        Initialize trackTypeAsString for call to GST_INFO_OBJECT() in TrackType::Text
+        https://bugs.webkit.org/show_bug.cgi?id=196350
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        trackTypeAsString was uninitialized in the
+        TrackPrivateBaseGStreamer::TrackType::Text case when calling
+        GST_INFO_OBJECT().
+
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::enableTrack):
+
 2019-04-09  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [ATK] Cleanup WebKitAccessibleHyperlink
index 7419b2e..de78a7c 100644 (file)
@@ -813,13 +813,13 @@ void MediaPlayerPrivateGStreamer::enableTrack(TrackPrivateBaseGStreamer::TrackTy
             selectedStreams.append(m_currentTextStreamId);
         break;
     case TrackPrivateBaseGStreamer::TrackType::Text:
+        propertyName = "current-text";
+        trackTypeAsString = "text";
         if (!selectedStreamId.isEmpty() && selectedStreamId == m_currentTextStreamId) {
             GST_INFO_OBJECT(pipeline(), "%s stream: %s already selected, not doing anything.", trackTypeAsString, selectedStreamId.utf8().data());
             return;
         }
 
-        propertyName = "current-text";
-        trackTypeAsString = "text";
         if (!m_currentAudioStreamId.isEmpty())
             selectedStreams.append(m_currentAudioStreamId);
         if (!m_currentVideoStreamId.isEmpty())