av_dict_set(&opt_dict, "send_expect_100", s->legacy_icecast ? "0" : "1", 0);
if (NOT_EMPTY(s->content_type))
av_dict_set(&opt_dict, "content_type", s->content_type, 0);
+ else
+ av_dict_set(&opt_dict, "content_type", "audio/mpeg", 0);
if (NOT_EMPTY(s->user_agent))
av_dict_set(&opt_dict, "user_agent", s->user_agent, 0);
// Build new URI for passing to http protocol
ff_url_join(h_url, sizeof(h_url), "http", auth, host, port, "%s", path);
// Finally open http proto handler
- ret = ffurl_open(&s->hd, h_url, AVIO_FLAG_READ_WRITE, NULL, &opt_dict);
+ ret = ffurl_open(&s->hd, h_url, AVIO_FLAG_READ_WRITE, NULL, &opt_dict,
+ h->protocols, h);
cleanup:
// Free variables
.version = LIBAVUTIL_VERSION_INT,
};
-URLProtocol ff_icecast_protocol = {
+const URLProtocol ff_icecast_protocol = {
.name = "icecast",
.url_open = icecast_open,
.url_write = icecast_write,