diff options
author | wm4 <wm4@nowhere> | 2016-01-12 23:50:17 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-01-12 23:50:17 +0100 |
commit | cbda46370c45604465eff55b979b02880cd46b25 (patch) | |
tree | 9df9a13a9bb211c7281e4659a825b5d666d5dce8 | |
parent | a4cdf1a727a3d9d59ba200c944a7eb74806c752c (diff) | |
download | mpv-cbda46370c45604465eff55b979b02880cd46b25.tar.bz2 mpv-cbda46370c45604465eff55b979b02880cd46b25.tar.xz |
stream: stream_read_complete() reads from current pos, not 0
(Well, I hope no caller really relied on this anyway.)
-rw-r--r-- | stream/stream.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stream/stream.c b/stream/stream.c index 77eccd76ca..1048a8006d 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -914,7 +914,7 @@ struct bstr stream_read_complete(struct stream *s, void *talloc_ctx, int total_read = 0; int padding = 1; char *buf = NULL; - int64_t size = stream_get_size(s); + int64_t size = stream_get_size(s) - stream_tell(s); if (size > max_size) return (struct bstr){NULL, 0}; if (size > 0) |