Skip to content

Commit

Permalink
Merge r228315 - [GStreamer] Layout test fast/replaced/border-radius-c…
Browse files Browse the repository at this point in the history
…lip.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

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.
  • Loading branch information
philn authored and carlosgcampos committed Feb 19, 2018
1 parent a59a975 commit 0e285df
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Source/WebCore/ChangeLog
@@ -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-13 Antti Koivisto <antti@apple.com>

REGRESSION(r228313): Membuster | macOS | All Devices | 1.5 MB
Expand Down
Expand Up @@ -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;

Expand Down
10 changes: 10 additions & 0 deletions Tools/ChangeLog
@@ -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.

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

2018-02-08 Michael Catanzaro <mcatanzaro@igalia.com>

TestController should not exercise cocoa-specific resource load statistics APIs
Expand Down
1 change: 1 addition & 0 deletions Tools/gstreamer/jhbuild.modules
Expand Up @@ -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"/>
Expand Down
@@ -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

0 comments on commit 0e285df

Please sign in to comment.