Title: [229127] trunk/Source/WebCore
Revision
229127
Author
ph...@webkit.org
Date
2018-03-01 01:24:54 -0800 (Thu, 01 Mar 2018)

Log Message

[GStreamer] text samples no longer processed
https://bugs.webkit.org/show_bug.cgi?id=183212

Reviewed by Xabier Rodriguez-Calvar.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::newTextSample): Refer to
track stream ID instead of (potentially) manually generated track
ID stored as hashmap keys.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (229126 => 229127)


--- trunk/Source/WebCore/ChangeLog	2018-03-01 09:24:24 UTC (rev 229126)
+++ trunk/Source/WebCore/ChangeLog	2018-03-01 09:24:54 UTC (rev 229127)
@@ -1,3 +1,15 @@
+2018-02-28  Philippe Normand  <pnorm...@igalia.com>
+
+        [GStreamer] text samples no longer processed
+        https://bugs.webkit.org/show_bug.cgi?id=183212
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::newTextSample): Refer to
+        track stream ID instead of (potentially) manually generated track
+        ID stored as hashmap keys.
+
 2018-02-28  Tim Horton  <timothy_hor...@apple.com>
 
         Push WTF_PLATFORM_IOS down into preprocessor.pm instead of trying to determine it inside

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (229126 => 229127)


--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2018-03-01 09:24:24 UTC (rev 229126)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2018-03-01 09:24:54 UTC (rev 229127)
@@ -983,9 +983,8 @@
         bool found = FALSE;
         const gchar* id;
         gst_event_parse_stream_start(streamStartEvent.get(), &id);
-        for (size_t i = 0; i < m_textTracks.size(); ++i) {
-            RefPtr<InbandTextTrackPrivateGStreamer> track = m_textTracks.get(id);
-            if (track) {
+        for (auto& track : m_textTracks.values()) {
+            if (!strcmp(track->streamId().utf8().data(), id)) {
                 track->handleSample(sample);
                 found = true;
                 break;
@@ -992,7 +991,7 @@
             }
         }
         if (!found)
-            GST_WARNING("Got sample with unknown stream ID.");
+            GST_WARNING("Got sample with unknown stream ID %s.", id);
     } else
         GST_WARNING("Unable to handle sample with no stream start event.");
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to