Skip to content

Commit

Permalink
Merge r223168 - [GStreamer] Fix double seek requested by downloadbuff…
Browse files Browse the repository at this point in the history
…er 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.
  • Loading branch information
calvaris authored and carlosgcampos committed Oct 17, 2017
1 parent aa4b3cf commit 79d077d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
18 changes: 18 additions & 0 deletions Source/WebCore/ChangeLog
@@ -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 Joanmarie Diggs <jdiggs@igalia.com>

AX: [ATK] ARIA form role should be mapped to ATK_ROLE_LANDMARK; not ATK_ROLE_FORM
Expand Down
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 79d077d

Please sign in to comment.