mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 21:18:52 +00:00
souphttpsrc: If the server reports "Accept-Ranges: none" don't try range requests
This commit is contained in:
parent
b417c3409b
commit
53b5a44a06
1 changed files with 11 additions and 0 deletions
|
@ -1034,6 +1034,7 @@ gst_soup_http_src_got_headers_cb (SoupMessage * msg, GstSoupHTTPSrc * src)
|
||||||
GHashTable *params = NULL;
|
GHashTable *params = NULL;
|
||||||
GstEvent *http_headers_event;
|
GstEvent *http_headers_event;
|
||||||
GstStructure *http_headers, *headers;
|
GstStructure *http_headers, *headers;
|
||||||
|
const gchar *accept_ranges;
|
||||||
|
|
||||||
GST_INFO_OBJECT (src, "got headers");
|
GST_INFO_OBJECT (src, "got headers");
|
||||||
|
|
||||||
|
@ -1098,6 +1099,16 @@ gst_soup_http_src_got_headers_cb (SoupMessage * msg, GstSoupHTTPSrc * src)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* If the server reports Accept-Ranges: none we don't have to try
|
||||||
|
* doing range requests at all
|
||||||
|
*/
|
||||||
|
if ((accept_ranges =
|
||||||
|
soup_message_headers_get_one (msg->response_headers,
|
||||||
|
"Accept-Ranges"))) {
|
||||||
|
if (g_ascii_strcasecmp (accept_ranges, "none") == 0)
|
||||||
|
src->seekable = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* Icecast stuff */
|
/* Icecast stuff */
|
||||||
tag_list = gst_tag_list_new_empty ();
|
tag_list = gst_tag_list_new_empty ();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue