summaryrefslogtreecommitdiffstats
path: root/stream/stream.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-01-12 23:50:17 +0100
committerwm4 <wm4@nowhere>2016-01-12 23:50:17 +0100
commitcbda46370c45604465eff55b979b02880cd46b25 (patch)
tree9df9a13a9bb211c7281e4659a825b5d666d5dce8 /stream/stream.c
parenta4cdf1a727a3d9d59ba200c944a7eb74806c752c (diff)
downloadmpv-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.)
Diffstat (limited to 'stream/stream.c')
-rw-r--r--stream/stream.c2
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)