[GStreamer] Layout test fast/replaced/border-radius-clip.html crashes with GStreamer...
authorphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Feb 2018 09:14:59 +0000 (09:14 +0000)
committerphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Feb 2018 09:14:59 +0000 (09:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=176802

Source/WebCore:

Reviewed by Xabier Rodriguez Calvar.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::load): Prevent the player from loading animated gifs.

Tools:

Reviewed by Xabier Rodriguez-Calvar.

* gstreamer/jhbuild.modules:
* gstreamer/patches/gst-plugins-good-0001-gstgdkpixbufdec-stop-pretending-to-decode-gifs.patch: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228315 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
Tools/ChangeLog
Tools/gstreamer/jhbuild.modules
Tools/gstreamer/patches/gst-plugins-good-0001-gstgdkpixbufdec-stop-pretending-to-decode-gifs.patch [new file with mode: 0644]

index d69d764..24e4702 100644 (file)
@@ -1,3 +1,13 @@
+2018-02-09  Philippe Normand  <pnormand@igalia.com>
+
+        [GStreamer] Layout test fast/replaced/border-radius-clip.html crashes with GStreamer-CRITICAL **: gst_segment_to_stream_time: assertion 'segment->format == format' failed in gst_segment_to_stream_time()
+        https://bugs.webkit.org/show_bug.cgi?id=176802
+
+        Reviewed by Xabier Rodriguez Calvar.
+
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::load): Prevent the player from loading animated gifs.
+
 2018-02-09  Antti Koivisto  <antti@apple.com>
 
         Move compiled selectors to StyleRule
index a8e7423..6d1df7e 100644 (file)
@@ -233,6 +233,14 @@ void MediaPlayerPrivateGStreamer::setPlaybinURL(const URL& url)
 
 void MediaPlayerPrivateGStreamer::load(const String& urlString)
 {
+    // FIXME: This method is still called even if supportsType() returned
+    // IsNotSupported. This would deserve more investigation but meanwhile make
+    // sure we don't ever try to play animated gif assets.
+    if (m_player->contentMIMEType() == "image/gif") {
+        loadingFailed(MediaPlayer::FormatError);
+        return;
+    }
+
     if (!MediaPlayerPrivateGStreamerBase::initializeGStreamerAndRegisterWebKitElements())
         return;
 
index f0aea05..a1ecb0c 100644 (file)
@@ -1,5 +1,15 @@
 2018-02-09  Philippe Normand  <pnormand@igalia.com>
 
+        [GStreamer] Layout test fast/replaced/border-radius-clip.html crashes with GStreamer-CRITICAL **: gst_segment_to_stream_time: assertion 'segment->format == format' failed in gst_segment_to_stream_time()
+        https://bugs.webkit.org/show_bug.cgi?id=176802
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        * gstreamer/jhbuild.modules:
+        * gstreamer/patches/gst-plugins-good-0001-gstgdkpixbufdec-stop-pretending-to-decode-gifs.patch: Added.
+
+2018-02-09  Philippe Normand  <pnormand@igalia.com>
+
         [JHBuild] Update Mesa to version 17
         https://bugs.webkit.org/show_bug.cgi?id=182599
 
index 01480ba..4ca13a7 100644 (file)
@@ -77,6 +77,7 @@
     <branch module="gst-plugins-good/gst-plugins-good-${version}.tar.xz" version="1.12.4"
             repo="gstreamer"
             hash="sha256:649f49bec60892d47ee6731b92266974c723554da1c6649f21296097715eb957">
+      <patch file="gst-plugins-good-0001-gstgdkpixbufdec-stop-pretending-to-decode-gifs.patch" strip="1"/>
       <patch file="gst-plugins-good-0005-souphttpsrc-cookie-jar-and-context-query-support.patch" strip="1"/>
       <patch file="gst-plugins-good-0006-qtdemux-add-context-for-a-preferred-protection.patch" strip="1"/>
       <patch file="gst-plugins-good-0008-qtdemux-also-push-buffers-without-encryption-info-in.patch" strip="1"/>
diff --git a/Tools/gstreamer/patches/gst-plugins-good-0001-gstgdkpixbufdec-stop-pretending-to-decode-gifs.patch b/Tools/gstreamer/patches/gst-plugins-good-0001-gstgdkpixbufdec-stop-pretending-to-decode-gifs.patch
new file mode 100644 (file)
index 0000000..9592ccf
--- /dev/null
@@ -0,0 +1,30 @@
+From c7a172517deb7ca8920b6c910998cfecd8b1893d Mon Sep 17 00:00:00 2001
+From: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+Date: Tue, 13 Jun 2017 18:51:32 +0200
+Subject: [PATCH] gstgdkpixbufdec: stop pretending to decode gifs.
+
+If you can't decode an animated gif, you can't decode a gif,
+so stop squatting GST_RANK_SECONDARY for that format, libav
+does a better job.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=784683
+---
+ ext/gdk_pixbuf/gstgdkpixbufdec.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ext/gdk_pixbuf/gstgdkpixbufdec.c b/ext/gdk_pixbuf/gstgdkpixbufdec.c
+index 1598c53be..09211bf17 100644
+--- a/ext/gdk_pixbuf/gstgdkpixbufdec.c
++++ b/ext/gdk_pixbuf/gstgdkpixbufdec.c
+@@ -38,7 +38,7 @@ static GstStaticPadTemplate gst_gdk_pixbuf_dec_sink_template =
+     GST_PAD_ALWAYS,
+     GST_STATIC_CAPS ("image/png; "
+         /* "image/jpeg; " disabled because we can't handle MJPEG */
+-        "image/gif; "
++        /*"image/gif; " disabled because we can't handle animated gifs */
+         "image/x-icon; "
+         "application/x-navi-animation; "
+         "image/x-cmu-raster; "
+-- 
+2.15.1
+