diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-07-02 20:18:16 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-07-02 20:18:16 +0200 |
commit | 4fb916551579d336ebea0dbe968314febb3a99d4 (patch) | |
tree | 2e101d05ece8408869e6dcad387efb39717f5726 /gnu/packages/patches | |
parent | 6661b025a6c58be6572fc66c5db1073f56af30b0 (diff) | |
parent | 30484be05d9e318e89e12f40a55c65766cec700a (diff) | |
download | guix-patches-4fb916551579d336ebea0dbe968314febb3a99d4.tar guix-patches-4fb916551579d336ebea0dbe968314febb3a99d4.tar.gz |
Merge branch 'staging' into core-updates
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/gstreamer-buffer-reset-offset.patch | 59 | ||||
-rw-r--r-- | gnu/packages/patches/webkitgtk-sans-gstreamer-gl.patch | 24 |
2 files changed, 59 insertions, 24 deletions
diff --git a/gnu/packages/patches/gstreamer-buffer-reset-offset.patch b/gnu/packages/patches/gstreamer-buffer-reset-offset.patch new file mode 100644 index 0000000000..024892a60f --- /dev/null +++ b/gnu/packages/patches/gstreamer-buffer-reset-offset.patch @@ -0,0 +1,59 @@ +Fix a buffer offset problem in GStreamer 1.16. Initially reported by Mark H. +Weaver in <https://lists.gnu.org/archive/html/guix-devel/2019-06/msg00140.html>. + +See also <https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/316>. + +From 1734c9fc1a4f99b165383ae1eb02f04e0844a00c Mon Sep 17 00:00:00 2001 +From: Nicolas Dufresne <nicolas.dufresne@collabora.com> +Date: Sat, 29 Jun 2019 09:22:05 -0400 +Subject: [PATCH] bufferpool: Fix the buffer size reset code + +The offset in gst_buffer_resize() is additive. So to move back the +offset to zero, we need to pass the opposite of the current offset. This +was raised through the related unit test failingon 32bit as on 64bit +the alignment padding was enough to hide the issue. The test was +modified to also fail on 64bit. This patch will remove spurious +assertions like: + + assertion 'bufmax >= bufoffs + offset + size' failed + +Fixes #316 +--- + gst/gstbufferpool.c | 7 +++++-- + tests/check/gst/gstbufferpool.c | 2 +- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/gst/gstbufferpool.c b/gst/gstbufferpool.c +index e5c7a5872..619860e63 100644 +--- a/gst/gstbufferpool.c ++++ b/gst/gstbufferpool.c +@@ -1222,8 +1222,11 @@ default_reset_buffer (GstBufferPool * pool, GstBuffer * buffer) + GST_BUFFER_OFFSET_END (buffer) = GST_BUFFER_OFFSET_NONE; + + /* if the memory is intact reset the size to the full size */ +- if (!GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_TAG_MEMORY)) +- gst_buffer_resize (buffer, 0, pool->priv->size); ++ if (!GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_TAG_MEMORY)) { ++ gsize offset; ++ gst_buffer_get_sizes (buffer, &offset, NULL); ++ gst_buffer_resize (buffer, -offset, pool->priv->size); ++ } + + /* remove all metadata without the POOLED flag */ + gst_buffer_foreach_meta (buffer, remove_meta_unpooled, pool); +diff --git a/tests/check/gst/gstbufferpool.c b/tests/check/gst/gstbufferpool.c +index f0c3c8d8e..dd9b2dc03 100644 +--- a/tests/check/gst/gstbufferpool.c ++++ b/tests/check/gst/gstbufferpool.c +@@ -190,7 +190,7 @@ GST_START_TEST (test_buffer_modify_discard) + gst_buffer_pool_acquire_buffer (pool, &buf, NULL); + buffer_track_destroy (buf, &dcount); + /* do resize, as we didn't modify the memory, pool should reuse this buffer */ +- gst_buffer_resize (buf, 5, 2); ++ gst_buffer_resize (buf, 8, 2); + gst_buffer_unref (buf); + + /* buffer should've gone back into pool */ +-- +2.22.0 + diff --git a/gnu/packages/patches/webkitgtk-sans-gstreamer-gl.patch b/gnu/packages/patches/webkitgtk-sans-gstreamer-gl.patch deleted file mode 100644 index 4577c81edb..0000000000 --- a/gnu/packages/patches/webkitgtk-sans-gstreamer-gl.patch +++ /dev/null @@ -1,24 +0,0 @@ -Fix build failure when USE_GSTREAMER_GL=off. See -<https://bugs.webkit.org/show_bug.cgi?id=196440>. - -This patch is taken from the upstream source repository: -<https://git.webkit.org/?p=WebKit.git;a=commitdiff;h=e2dd6decbe25ea9498f1ba213808f34b232740c7>. - -diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp -index 00a2af6489e..5cb5f7536ac 100644 ---- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp -+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp -@@ -1000,11 +1000,13 @@ void MediaPlayerPrivateGStreamerBase::updateTextureMapperFlags() - break; - } - -+#if USE(GSTREAMER_GL) - // When the imxvpudecoder is used, the texture sampling of the - // directviv-uploaded texture returns an RGB value, so there's no need to - // convert it. - if (m_videoDecoderPlatform != WebKitGstVideoDecoderPlatform::ImxVPU) - m_textureMapperFlags |= TEXTURE_MAPPER_COLOR_CONVERT_FLAG; -+#endif - } - #endif - |