1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 00:02:13 +00:00

stream: stream_read_complete() reads from current pos, not 0

(Well, I hope no caller really relied on this anyway.)
This commit is contained in:
wm4 2016-01-12 23:50:17 +01:00
parent a4cdf1a727
commit cbda46370c

View File

@ -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)