summaryrefslogtreecommitdiffstats
path: root/stream/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/stream.c')
-rw-r--r--stream/stream.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/stream/stream.c b/stream/stream.c
index 1f77a5dd1e..7fbc0d3373 100644
--- a/stream/stream.c
+++ b/stream/stream.c
@@ -710,10 +710,7 @@ int stream_control(stream_t *s, int cmd, void *arg)
// Return the current size of the stream, or a negative value if unknown.
int64_t stream_get_size(stream_t *s)
{
- int64_t size = -1;
- if (stream_control(s, STREAM_CTRL_GET_SIZE, &size) != STREAM_OK)
- size = -1;
- return size;
+ return s->get_size ? s->get_size(s) : -1;
}
void free_stream(stream_t *s)