Title: [231351] trunk/Source/WebCore
- Revision
- 231351
- Author
- [email protected]
- Date
- 2018-05-04 06:26:13 -0700 (Fri, 04 May 2018)
Log Message
[MSE][GStreamer] Delete properly the stream from the WebKitMediaSource
https://bugs.webkit.org/show_bug.cgi?id=185242
Patch by Yacine Bandou <[email protected]> on 2018-05-04
Reviewed by Xabier Rodriguez-Calvar.
When the sourceBuffer is removed from mediasource, the appropriate stream is not
properly deleted from WebKitMediaSource, because the appsrc and parser elements
of the stream are not removed from the WebKitMediaSource bin.
This patch avoids the regression of r231089, see https://bugs.webkit.org/show_bug.cgi?id=185071
* platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
(webKitMediaSrcFreeStream):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (231350 => 231351)
--- trunk/Source/WebCore/ChangeLog 2018-05-04 10:14:27 UTC (rev 231350)
+++ trunk/Source/WebCore/ChangeLog 2018-05-04 13:26:13 UTC (rev 231351)
@@ -1,3 +1,19 @@
+2018-05-04 Yacine Bandou <[email protected]>
+
+ [MSE][GStreamer] Delete properly the stream from the WebKitMediaSource
+ https://bugs.webkit.org/show_bug.cgi?id=185242
+
+ Reviewed by Xabier Rodriguez-Calvar.
+
+ When the sourceBuffer is removed from mediasource, the appropriate stream is not
+ properly deleted from WebKitMediaSource, because the appsrc and parser elements
+ of the stream are not removed from the WebKitMediaSource bin.
+
+ This patch avoids the regression of r231089, see https://bugs.webkit.org/show_bug.cgi?id=185071
+
+ * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
+ (webKitMediaSrcFreeStream):
+
2018-05-04 Carlos Garcia Campos <[email protected]>
[GTK] Epiphany (GNOME Web) says "Error downloading: Service Unavailable." when trying to download an image from discogs.com
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp (231350 => 231351)
--- trunk/Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp 2018-05-04 10:14:27 UTC (rev 231350)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp 2018-05-04 13:26:13 UTC (rev 231351)
@@ -513,8 +513,33 @@
// Don't trigger callbacks from this appsrc to avoid using the stream anymore.
gst_app_src_set_callbacks(GST_APP_SRC(stream->appsrc), &disabledAppsrcCallbacks, nullptr, nullptr);
gst_app_src_end_of_stream(GST_APP_SRC(stream->appsrc));
+ gst_element_set_state(stream->appsrc, GST_STATE_NULL);
+ gst_bin_remove(GST_BIN(source), stream->appsrc);
+ stream->appsrc = nullptr;
}
+ if (stream->parser) {
+ gst_element_set_state(stream->parser, GST_STATE_NULL);
+ gst_bin_remove(GST_BIN(source), stream->parser);
+ stream->parser = nullptr;
+ }
+
+ GST_OBJECT_LOCK(source);
+ switch (stream->type) {
+ case WebCore::Audio:
+ source->priv->numberOfAudioStreams--;
+ break;
+ case WebCore::Video:
+ source->priv->numberOfVideoStreams--;
+ break;
+ case WebCore::Text:
+ source->priv->numberOfTextStreams--;
+ break;
+ default:
+ break;
+ }
+ GST_OBJECT_UNLOCK(source);
+
if (stream->type != WebCore::Invalid) {
GST_DEBUG("Freeing track-related info on stream %p", stream);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes