summaryrefslogtreecommitdiffstats
path: root/ext/soup
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-07-16 19:35:44 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-07-16 19:35:44 +0200
commit226a12505683fdfc6e3fc403ed55fe8f8e56f470 (patch)
tree273bda207c3b20b05176e3cb07293465b912d476 /ext/soup
parent07c454d61ec014334812517e24aa694552dbe03d (diff)
souphttpsrc: Only assume seekability if the server provides Content-Length
Previously seekability way always assumed until the first seek actually failed. Now we assume that all servers are not seekable unless they provide a Content-Length header. If a seek fails after that we continue to assume no seekability. Fixes bug #585576.
Diffstat (limited to 'ext/soup')
-rw-r--r--ext/soup/gstsouphttpsrc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c
index 1a94576f..c50fd3e8 100644
--- a/ext/soup/gstsouphttpsrc.c
+++ b/ext/soup/gstsouphttpsrc.c
@@ -318,7 +318,7 @@ gst_soup_http_src_reset (GstSoupHTTPSrc * src)
src->interrupted = FALSE;
src->retry = FALSE;
src->have_size = FALSE;
- src->seekable = TRUE;
+ src->seekable = FALSE;
src->read_position = 0;
src->request_position = 0;
@@ -751,6 +751,7 @@ gst_soup_http_src_got_headers_cb (SoupMessage * msg, GstSoupHTTPSrc * src)
if (!src->have_size || (src->content_size != newsize)) {
src->content_size = newsize;
src->have_size = TRUE;
+ src->seekable = TRUE;
GST_DEBUG_OBJECT (src, "size = %" G_GUINT64_FORMAT, src->content_size);
basesrc = GST_BASE_SRC_CAST (src);