Title: [145318] trunk/Source/WebCore
- Revision
- 145318
- Author
- [email protected]
- Date
- 2013-03-09 08:34:13 -0800 (Sat, 09 Mar 2013)
Log Message
Fix offset handling in GStreamer WebKitWebSource.
https://bugs.webkit.org/show_bug.cgi?id=111888
Patch by Sebastian Dröge <[email protected]> on 2013-03-09
Reviewed by Philippe Normand.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcSeekDataCb):
(StreamingClient::didReceiveData):
The offset handling in WebKitWebSource was completely wrong
before and caused wrong offsets to be set on the GStreamer buffers
after a seek.
Apart from that there was also a race condition that happens
when a downstream element causes seeks in very short succession
and is switching between two different parts of the stream.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (145317 => 145318)
--- trunk/Source/WebCore/ChangeLog 2013-03-09 12:45:28 UTC (rev 145317)
+++ trunk/Source/WebCore/ChangeLog 2013-03-09 16:34:13 UTC (rev 145318)
@@ -1,3 +1,21 @@
+2013-03-09 Sebastian Dröge <[email protected]>
+
+ Fix offset handling in GStreamer WebKitWebSource.
+ https://bugs.webkit.org/show_bug.cgi?id=111888
+
+ Reviewed by Philippe Normand.
+
+ * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
+ (webKitWebSrcSeekDataCb):
+ (StreamingClient::didReceiveData):
+ The offset handling in WebKitWebSource was completely wrong
+ before and caused wrong offsets to be set on the GStreamer buffers
+ after a seek.
+
+ Apart from that there was also a race condition that happens
+ when a downstream element causes seeks in very short succession
+ and is switching between two different parts of the stream.
+
2013-03-09 Keishi Hattori <[email protected]>
Month transition animation is missing in some places
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp (145317 => 145318)
--- trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp 2013-03-09 12:45:28 UTC (rev 145317)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp 2013-03-09 16:34:13 UTC (rev 145318)
@@ -464,6 +464,7 @@
val.set(g_strdup_printf("bytes=%" G_GUINT64_FORMAT "-", priv->requestedOffset));
request.setHTTPHeaderField("Range", val.get());
}
+ priv->offset = priv->requestedOffset;
if (priv->iradioMode)
request.setHTTPHeaderField("icy-metadata", "1");
@@ -746,7 +747,7 @@
WebKitWebSrcPrivate* priv = src->priv;
GST_DEBUG_OBJECT(src, "Seeking to offset: %" G_GUINT64_FORMAT, offset);
- if (offset == priv->offset)
+ if (offset == priv->offset && priv->requestedOffset == priv->offset)
return TRUE;
if (!priv->seekable)
@@ -909,6 +910,8 @@
setGstBufferSize(priv->buffer.get(), length);
GST_BUFFER_OFFSET(priv->buffer.get()) = priv->offset;
+ if (priv->requestedOffset == priv->offset)
+ priv->requestedOffset += length;
priv->offset += length;
GST_BUFFER_OFFSET_END(priv->buffer.get()) = priv->offset;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes