Title: [232925] trunk/Source/WebCore
- Revision
- 232925
- Author
- [email protected]
- Date
- 2018-06-18 01:54:42 -0700 (Mon, 18 Jun 2018)
Log Message
[GStreamer] Crash when adding in-band text track with playbin3 enabled
https://bugs.webkit.org/show_bug.cgi?id=186654
Reviewed by Xabier Rodriguez-Calvar.
Text track indexes should be relative to the total amount of
in-band text tracks. The previous code would induce the creation
of in-band text tracks with indexes relative to the total amount
of all in-band (audio, video, text) tracks.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::updateTracks):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (232924 => 232925)
--- trunk/Source/WebCore/ChangeLog 2018-06-18 08:40:24 UTC (rev 232924)
+++ trunk/Source/WebCore/ChangeLog 2018-06-18 08:54:42 UTC (rev 232925)
@@ -1,3 +1,18 @@
+2018-06-18 Philippe Normand <[email protected]>
+
+ [GStreamer] Crash when adding in-band text track with playbin3 enabled
+ https://bugs.webkit.org/show_bug.cgi?id=186654
+
+ Reviewed by Xabier Rodriguez-Calvar.
+
+ Text track indexes should be relative to the total amount of
+ in-band text tracks. The previous code would induce the creation
+ of in-band text tracks with indexes relative to the total amount
+ of all in-band (audio, video, text) tracks.
+
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivateGStreamer::updateTracks):
+
2018-06-17 Zalan Bujtas <[email protected]>
Anonymous block collapsing can destroy the renderer's parent.
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (232924 => 232925)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2018-06-18 08:40:24 UTC (rev 232924)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2018-06-18 08:54:42 UTC (rev 232925)
@@ -700,6 +700,7 @@
bool oldHasVideo = m_hasVideo;
// New stream collections override previous ones.
clearTracks();
+ unsigned textTrackIndex = 0;
for (unsigned i = 0; i < length; i++) {
GRefPtr<GstStream> stream = gst_stream_collection_get_stream(m_streamCollection.get(), i);
String streamId(gst_stream_get_stream_id(stream.get()));
@@ -712,7 +713,7 @@
CREATE_TRACK(video, Video)
} else if (type & GST_STREAM_TYPE_TEXT && !useMediaSource) {
#if ENABLE(VIDEO_TRACK)
- RefPtr<InbandTextTrackPrivateGStreamer> track = InbandTextTrackPrivateGStreamer::create(i, stream);
+ RefPtr<InbandTextTrackPrivateGStreamer> track = InbandTextTrackPrivateGStreamer::create(textTrackIndex++, stream);
m_textTracks.add(streamId, track);
m_player->addTextTrack(*track);
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes