diff options
Diffstat (limited to 'stream/stream_concat.c')
-rw-r--r-- | stream/stream_concat.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/stream/stream_concat.c b/stream/stream_concat.c index 339f1cf56c..f45bd6f743 100644 --- a/stream/stream_concat.c +++ b/stream/stream_concat.c @@ -73,14 +73,10 @@ static int seek(struct stream *s, int64_t newpos) return ok; } -static int control(struct stream *s, int cmd, void *arg) +static int64_t get_size(struct stream *s) { struct priv *p = s->priv; - if (cmd == STREAM_CTRL_GET_SIZE && p->size >= 0) { - *(int64_t *)arg = p->size; - return 1; - } - return STREAM_UNSUPPORTED; + return p->size; } static void s_close(struct stream *s) @@ -97,7 +93,7 @@ static int open2(struct stream *stream, struct stream_open_args *args) stream->priv = p; stream->fill_buffer = fill_buffer; - stream->control = control; + stream->get_size = get_size; stream->close = s_close; stream->seekable = true; |