Skip to content
Permalink
Browse files
[GStreamer] Fix double seek requested by downloadbuffer GStreamer ele…
…ment 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.


Canonical link: https://commits.webkit.org/194408@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
calvaris committed Oct 11, 2017
1 parent 5fa086a commit d8a3376d1b90e6c09a74b3ce35b677497375a226
Showing 2 changed files with 20 additions and 2 deletions.
@@ -1,3 +1,21 @@
2017-10-10 Xabier Rodriguez Calvar <calvaris@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 <rniwa@webkit.org>

Enable custom pasteboard data in DumpRenderTree and WebKitTestRunner
@@ -58,7 +58,7 @@ class CachedResourceStreamingClient final : public PlatformMediaResourceClient {
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 @@ static void webKitWebSrcStop(WebKitWebSrc* src)
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) {

0 comments on commit d8a3376

Please sign in to comment.