summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--stream/stream.c2
-rw-r--r--stream/stream.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/stream/stream.c b/stream/stream.c
index 773f8662c4..617420b5ae 100644
--- a/stream/stream.c
+++ b/stream/stream.c
@@ -300,6 +300,8 @@ static int open_internal(const stream_info_t *sinfo, struct stream *underlying,
.priv_defaults = sinfo->priv_defaults,
.options = sinfo->options,
};
+ if (sinfo->get_defaults)
+ desc.priv_defaults = sinfo->get_defaults(s);
struct m_config *config = m_config_from_obj_desc(s, s->log, &desc);
s->priv = config->optstruct;
if (s->info->url_options && !parse_url(s, config)) {
diff --git a/stream/stream.h b/stream/stream.h
index ba3f6a4fe0..4561ec3cdc 100644
--- a/stream/stream.h
+++ b/stream/stream.h
@@ -132,6 +132,7 @@ typedef struct stream_info_st {
const char **protocols;
int priv_size;
const void *priv_defaults;
+ void *(*get_defaults)(struct stream *st);
const struct m_option *options;
const char **url_options;
bool stream_filter;