Title: [223168] trunk/Source/WebCore
Revision
223168
Author
calva...@igalia.com
Date
2017-10-10 22:48:47 -0700 (Tue, 10 Oct 2017)

Log Message

[GStreamer] Fix double seek requested by downloadbuffer GStreamer element in webkibwebsrc
https://bugs.webkit.org/show_bug.cgi?id=178079

Reviewed by Žan Doberšek.

When the downloadbuffer GStreamer element requests two seeks too
close to each other there's some rare race condition where our
source answers that it is not seekable and ends up with
downloadbuffer element to seek beyond the file size, which causes
the server to issue a 416 HTTP error code eventually, causing our
MediaPlayer to stop.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcStop): We only unset he seekable attribute if we are
not seeking.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (223167 => 223168)


--- trunk/Source/WebCore/ChangeLog	2017-10-11 04:12:30 UTC (rev 223167)
+++ trunk/Source/WebCore/ChangeLog	2017-10-11 05:48:47 UTC (rev 223168)
@@ -1,3 +1,21 @@
+2017-10-10  Xabier Rodriguez Calvar  <calva...@igalia.com>
+
+        [GStreamer] Fix double seek requested by downloadbuffer GStreamer element in webkibwebsrc
+        https://bugs.webkit.org/show_bug.cgi?id=178079
+
+        Reviewed by Žan Doberšek.
+
+        When the downloadbuffer GStreamer element requests two seeks too
+        close to each other there's some rare race condition where our
+        source answers that it is not seekable and ends up with
+        downloadbuffer element to seek beyond the file size, which causes
+        the server to issue a 416 HTTP error code eventually, causing our
+        MediaPlayer to stop.
+
+        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
+        (webKitWebSrcStop): We only unset he seekable attribute if we are
+        not seeking.
+
 2017-10-10  Ryosuke Niwa  <rn...@webkit.org>
 
         Enable custom pasteboard data in DumpRenderTree and WebKitTestRunner

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp (223167 => 223168)


--- trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp	2017-10-11 04:12:30 UTC (rev 223167)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp	2017-10-11 05:48:47 UTC (rev 223168)
@@ -58,7 +58,7 @@
     virtual ~CachedResourceStreamingClient();
 private:
 #if USE(SOUP)
-    char* getOrCreateReadBuffer(PlatformMediaResource&, size_t requestedSize, size_t& actualSize);
+    char* getOrCreateReadBuffer(PlatformMediaResource&, size_t requestedSize, size_t& actualSize) override;
 #endif
     // PlatformMediaResourceClient virtual methods.
     void responseReceived(PlatformMediaResource&, const ResourceResponse&) override;
@@ -373,12 +373,12 @@
     priv->paused = false;
 
     priv->offset = 0;
-    priv->seekable = FALSE;
 
     if (!wasSeeking) {
         priv->size = 0;
         priv->requestedOffset = 0;
         priv->player = nullptr;
+        priv->seekable = FALSE;
     }
 
     if (priv->appsrc) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to