Diff
Modified: trunk/Tools/buildstream/ChangeLog (273234 => 273235)
--- trunk/Tools/buildstream/ChangeLog 2021-02-22 10:21:53 UTC (rev 273234)
+++ trunk/Tools/buildstream/ChangeLog 2021-02-22 10:39:11 UTC (rev 273235)
@@ -1,3 +1,21 @@
+2021-02-22 Philippe Normand <[email protected]>
+
+ [Flatpak SDK] Update to GStreamer 1.18.3 and backport one patch from upcoming 1.18.4
+ https://bugs.webkit.org/show_bug.cgi?id=222033
+
+ Reviewed by Žan Doberšek.
+
+ The backported patch fixes a racy crash in media/media-source/media-source-webm.html, where
+ the player would be destroyed quickly after being created.
+
+ * elements/freedesktop-sdk.bst: Update junction.
+ * elements/sdk/gst-libav.bst: Bump to 1.18.3
+ * elements/sdk/gst-plugins-bad.bst: Ditto.
+ * elements/sdk/gst-plugins-base.bst: Ditto and backport patch from 1.18.4.
+ * elements/sdk/gst-plugins-good.bst: Bump to 1.18.3
+ * elements/sdk/gstreamer.bst: Ditto.
+ * patches/gst-plugins-base-0001-videodecoder-Fix-racy-critical-when-pool-negotiation.patch: Added.
+
2021-01-15 Philippe Normand <[email protected]>
[Flatpak SDK] Cargo recipes improvements
Modified: trunk/Tools/buildstream/elements/freedesktop-sdk.bst (273234 => 273235)
--- trunk/Tools/buildstream/elements/freedesktop-sdk.bst 2021-02-22 10:21:53 UTC (rev 273234)
+++ trunk/Tools/buildstream/elements/freedesktop-sdk.bst 2021-02-22 10:39:11 UTC (rev 273235)
@@ -5,7 +5,7 @@
url: gitlab_com:freedesktop-sdk/freedesktop-sdk.git
# Changed to track git commit from upstream bst
track: 'release/20.08'
- ref: freedesktop-sdk-20.08.3-55-g96e34a68c3ca460d798e9cf396e0ac1509d5a7b0
+ ref: freedesktop-sdk-20.08.4-26-g4421da17dc0a37cc6bb159eceb64b839841c7392
- kind: patch
path: patches/nettle-no-debug.diff
- kind: patch
Modified: trunk/Tools/buildstream/elements/sdk/gst-libav.bst (273234 => 273235)
--- trunk/Tools/buildstream/elements/sdk/gst-libav.bst 2021-02-22 10:21:53 UTC (rev 273234)
+++ trunk/Tools/buildstream/elements/sdk/gst-libav.bst 2021-02-22 10:39:11 UTC (rev 273235)
@@ -1,8 +1,8 @@
kind: meson
sources:
- kind: tar
- url: gst_downloads:gst-libav/gst-libav-1.18.2.tar.xz
- ref: 36969ad44c5f0756a8a90215410710d6c39713d58f6cee13d663be9774557f49
+ url: gst_downloads:gst-libav/gst-libav-1.18.3.tar.xz
+ ref: ad20546bcd78ac1e7cf194666d73c4f33efeb62647d2b6af22993b540699e91c
build-depends:
- freedesktop-sdk.bst:public-stacks/buildsystem-meson.bst
- freedesktop-sdk.bst:components/nasm.bst
Modified: trunk/Tools/buildstream/elements/sdk/gst-plugins-bad.bst (273234 => 273235)
--- trunk/Tools/buildstream/elements/sdk/gst-plugins-bad.bst 2021-02-22 10:21:53 UTC (rev 273234)
+++ trunk/Tools/buildstream/elements/sdk/gst-plugins-bad.bst 2021-02-22 10:39:11 UTC (rev 273235)
@@ -1,8 +1,8 @@
kind: meson
sources:
- kind: tar
- url: gst_downloads:gst-plugins-bad/gst-plugins-bad-1.18.2.tar.xz
- ref: 8ad5822f1118fe46a19af54422b74e3a16d79a6800dcb173b49e199a496b341a
+ url: gst_downloads:gst-plugins-bad/gst-plugins-bad-1.18.3.tar.xz
+ ref: b7e34b6b86272588fbd8b314dadfa6ceff895198cfb59e2950378e9e31ff22e0
build-depends:
- freedesktop-sdk.bst:public-stacks/buildsystem-meson.bst
depends:
Modified: trunk/Tools/buildstream/elements/sdk/gst-plugins-base.bst (273234 => 273235)
--- trunk/Tools/buildstream/elements/sdk/gst-plugins-base.bst 2021-02-22 10:21:53 UTC (rev 273234)
+++ trunk/Tools/buildstream/elements/sdk/gst-plugins-base.bst 2021-02-22 10:39:11 UTC (rev 273235)
@@ -1,8 +1,11 @@
kind: meson
sources:
- kind: tar
- url: gst_downloads:gst-plugins-base/gst-plugins-base-1.18.2.tar.xz
- ref: dd04fb1f7826e2f6d9b4d66fc22f19cc6a47c301e13041f0ee3d7f65c89b05ac
+ url: gst_downloads:gst-plugins-base/gst-plugins-base-1.18.3.tar.xz
+ ref: dbfa20283848f0347a223dd8523dfb62e09e5220b21b1d157a8b0c8b67ba9f52
+# Backport of https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1031 to be shipped in 1.18.4
+- kind: patch
+ path: patches/gst-plugins-base-0001-videodecoder-Fix-racy-critical-when-pool-negotiation.patch
build-depends:
- freedesktop-sdk.bst:public-stacks/buildsystem-meson.bst
depends:
Modified: trunk/Tools/buildstream/elements/sdk/gst-plugins-good.bst (273234 => 273235)
--- trunk/Tools/buildstream/elements/sdk/gst-plugins-good.bst 2021-02-22 10:21:53 UTC (rev 273234)
+++ trunk/Tools/buildstream/elements/sdk/gst-plugins-good.bst 2021-02-22 10:39:11 UTC (rev 273235)
@@ -1,8 +1,8 @@
kind: meson
sources:
- kind: tar
- url: gst_downloads:gst-plugins-good/gst-plugins-good-1.18.2.tar.xz
- ref: f71752dde434d9ec55fa5e8d2e2a3be3fc6eb5b34f397b065f84aead25b449a4
+ url: gst_downloads:gst-plugins-good/gst-plugins-good-1.18.3.tar.xz
+ ref: 9b3b8e05d4d6073bf929fb33e2d8f74dd81ff21fa5b50c3273c78dfa2ab9c5cb
build-depends:
- freedesktop-sdk.bst:public-stacks/buildsystem-meson.bst
depends:
Modified: trunk/Tools/buildstream/elements/sdk/gstreamer.bst (273234 => 273235)
--- trunk/Tools/buildstream/elements/sdk/gstreamer.bst 2021-02-22 10:21:53 UTC (rev 273234)
+++ trunk/Tools/buildstream/elements/sdk/gstreamer.bst 2021-02-22 10:39:11 UTC (rev 273235)
@@ -1,8 +1,8 @@
kind: meson
sources:
- kind: tar
- url: gst_downloads:gstreamer/gstreamer-1.18.2.tar.xz
- ref: 66cdeb4f970c2e55932a2f427177d438fe2c55c0b6d29e80fda80263f2ae5446
+ url: gst_downloads:gstreamer/gstreamer-1.18.3.tar.xz
+ ref: 0c2e09e18f2df69a99b5cb3bd53c597b3cc2e35cf6c98043bb86a66f3d312100
# Backport of https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/679 to be shipped in 1.20.
- kind: patch
path: patches/gstreamer-0001-devicemonitor-Stop-only-the-already-started-provider.patch
Added: trunk/Tools/buildstream/patches/gst-plugins-base-0001-videodecoder-Fix-racy-critical-when-pool-negotiation.patch (0 => 273235)
--- trunk/Tools/buildstream/patches/gst-plugins-base-0001-videodecoder-Fix-racy-critical-when-pool-negotiation.patch (rev 0)
+++ trunk/Tools/buildstream/patches/gst-plugins-base-0001-videodecoder-Fix-racy-critical-when-pool-negotiation.patch 2021-02-22 10:39:11 UTC (rev 273235)
@@ -0,0 +1,76 @@
+From b944a254cb9768ca158d0a25d5a3df33cc028986 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Alicia=20Boya=20Garc=C3=ADa?= <[email protected]>
+Date: Sat, 13 Feb 2021 00:27:04 +0100
+Subject: [PATCH] videodecoder: Fix racy critical when pool negotiation occurs
+ during flush
+
+I found a rather reproducible race in a WebKit LayoutTest when a player
+was intantiated and a VP8/9 video was loaded, then torn down after
+getting the video dimensions from the caps.
+
+The crash occurs during the handling of the first frame by gstvpxdec.
+The following actions happen sequentially leading to a crash.
+
+(MT=Main Thread, ST=Streaming Thread)
+
+MT: Sets pipeline state to NULL, which deactivates vpxdec's srcpad,
+ which in turn sets its FLUSHING flag.
+
+ST: gst_vpx_dec_handle_frame() -- which is still running -- calls
+ gst_video_decoder_allocate_output_frame(); this in turn calls
+ gst_video_decoder_negotiate_unlocked() which fails because the
+ srcpad is FLUSHING. As a direct consequence of the negotiation
+ failure, a pool is NOT set.
+
+ gst_video_decoder_negotiate_unlocked() still assumes there is a
+ pool, crashing in a critical in gst_buffer_pool_acquire_buffer()
+ a couple statements later.
+
+This patch fixes the bug by returning != GST_FLOW_OK when the
+negotiation fails. If the srcpad is FLUSHING, GST_FLOW_FLUSHING is
+returned, otherwise GST_FLOW_ERROR is used.
+
+Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1037>
+---
+ gst-libs/gst/video/gstvideodecoder.c | 17 ++++++++++++++++-
+ 1 file changed, 16 insertions(+), 1 deletion(-)
+
+diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c
+index f687e3996b..935a2ff3a6 100644
+--- a/gst-libs/gst/video/gstvideodecoder.c
++++ b/gst-libs/gst/video/gstvideodecoder.c
+@@ -4258,8 +4258,19 @@ gst_video_decoder_allocate_output_frame_with_params (GstVideoDecoder *
+ needs_reconfigure = gst_pad_check_reconfigure (decoder->srcpad);
+ if (G_UNLIKELY (decoder->priv->output_state_changed || needs_reconfigure)) {
+ if (!gst_video_decoder_negotiate_unlocked (decoder)) {
+- GST_DEBUG_OBJECT (decoder, "Failed to negotiate, fallback allocation");
+ gst_pad_mark_reconfigure (decoder->srcpad);
++ if (GST_PAD_IS_FLUSHING (decoder->srcpad)) {
++ GST_DEBUG_OBJECT (decoder,
++ "Failed to negotiate a pool: pad is flushing");
++ goto flushing;
++ } else if (!decoder->priv->pool || decoder->priv->output_state_changed) {
++ GST_DEBUG_OBJECT (decoder,
++ "Failed to negotiate a pool and no previous pool to reuse");
++ goto error;
++ } else {
++ GST_DEBUG_OBJECT (decoder,
++ "Failed to negotiate a pool, falling back to the previous pool");
++ }
+ }
+ }
+
+@@ -4272,6 +4283,10 @@ gst_video_decoder_allocate_output_frame_with_params (GstVideoDecoder *
+
+ return flow_ret;
+
++flushing:
++ GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);
++ return GST_FLOW_FLUSHING;
++
+ error:
+ GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);
+ return GST_FLOW_ERROR;
+--
+2.29.2
+