[GStreamer] media/video-src-blob-using-open-panel.html crashes in Debug
authorphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Feb 2018 09:57:37 +0000 (09:57 +0000)
committerphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Feb 2018 09:57:37 +0000 (09:57 +0000)
https://bugs.webkit.org/show_bug.cgi?id=183005

Reviewed by Xabier Rodriguez-Calvar.

Test: media/video-src-blob-using-open-panel.html

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::convertToInternalProtocol): Also convert blob URIs
because they're handled by our httpsrc element.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcGetProtocols): Prefix blob URIs too, for consistency purpose.

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp

index 7fded12..714ea2c 100644 (file)
@@ -1,3 +1,18 @@
+2018-02-23  Philippe Normand  <pnormand@igalia.com>
+
+        [GStreamer] media/video-src-blob-using-open-panel.html crashes in Debug
+        https://bugs.webkit.org/show_bug.cgi?id=183005
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        Test: media/video-src-blob-using-open-panel.html
+
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::convertToInternalProtocol): Also convert blob URIs
+        because they're handled by our httpsrc element.
+        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
+        (webKitWebSrcGetProtocols): Prefix blob URIs too, for consistency purpose.
+
 2018-02-22  Yusuke Suzuki  <utatane.tea@gmail.com>
 
         Remove currentTime() / currentTimeMS()
index fd00d59..9ddc980 100644 (file)
@@ -216,7 +216,7 @@ MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer()
 
 static void convertToInternalProtocol(URL& url)
 {
-    if (url.protocolIsInHTTPFamily())
+    if (url.protocolIsInHTTPFamily() || url.protocolIsBlob())
         url.setProtocol("webkit+" + url.protocol());
 }
 
index c867115..acf6ace 100644 (file)
@@ -618,7 +618,7 @@ static GstURIType webKitWebSrcUriGetType(GType)
 
 const gchar* const* webKitWebSrcGetProtocols(GType)
 {
-    static const char* protocols[] = {"webkit+http", "webkit+https", "blob", nullptr };
+    static const char* protocols[] = {"webkit+http", "webkit+https", "webkit+blob", nullptr };
     return protocols;
 }