mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
uridownloader: Unset referer if none was specified later on
This commit is contained in:
parent
b47c92df82
commit
dede842409
1 changed files with 11 additions and 6 deletions
|
@ -378,14 +378,19 @@ gst_uri_downloader_set_uri (GstUriDownloader * downloader, const gchar * uri,
|
|||
g_object_set (downloader->priv->urisrc, "compress", compress, NULL);
|
||||
if (g_object_class_find_property (gobject_class, "keep-alive"))
|
||||
g_object_set (downloader->priv->urisrc, "keep-alive", TRUE, NULL);
|
||||
if (referer && g_object_class_find_property (gobject_class, "extra-headers")) {
|
||||
if (g_object_class_find_property (gobject_class, "extra-headers")) {
|
||||
if (referer) {
|
||||
GstStructure *extra_headers =
|
||||
gst_structure_new ("headers", "Referer", G_TYPE_STRING, referer, NULL);
|
||||
gst_structure_new ("headers", "Referer", G_TYPE_STRING, referer,
|
||||
NULL);
|
||||
|
||||
g_object_set (downloader->priv->urisrc, "extra-headers", extra_headers,
|
||||
NULL);
|
||||
|
||||
gst_structure_free (extra_headers);
|
||||
} else {
|
||||
g_object_set (downloader->priv->urisrc, "extra-headers", NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/* add a sync handler for the bus messages to detect errors in the download */
|
||||
|
|
Loading…
Reference in a new issue