diff options
Diffstat (limited to 'stream/stream_concat.c')
-rw-r--r-- | stream/stream_concat.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/stream/stream_concat.c b/stream/stream_concat.c index 47684b590a..a646f1c155 100644 --- a/stream/stream_concat.c +++ b/stream/stream_concat.c @@ -91,7 +91,7 @@ static void s_close(struct stream *s) free_stream(p->streams[n]); } -static int open2(struct stream *stream, void *arg) +static int open2(struct stream *stream, struct stream_open_args *args) { struct priv *p = talloc_zero(stream, struct priv); stream->priv = p; @@ -102,7 +102,7 @@ static int open2(struct stream *stream, void *arg) stream->seekable = true; - struct priv *list = arg; + struct priv *list = args->special_arg; if (!list || !list->num_streams) { MP_FATAL(stream, "No sub-streams.\n"); return STREAM_ERROR; @@ -153,8 +153,16 @@ struct stream *stream_concat_open(struct mpv_global *global, struct mp_cancel *c .num_streams = num_streams, }; + struct stream_open_args sargs = { + .global = global, + .cancel = c, + .url = "concat://", + .flags = STREAM_READ | STREAM_SILENT, + .sinfo = &stream_info_concat, + .special_arg = &arg, + }; + struct stream *s = NULL; - stream_create_instance(&stream_info_concat, "concat://", - STREAM_READ | STREAM_SILENT, c, global, &arg, &s); + stream_create_with_args(&sargs, &s); return s; } |