mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-26 21:00:21 +00:00
stream_file: remove unnecessary short write logic
See previous commit.
This commit is contained in:
@@ -123,16 +123,7 @@ static int fill_buffer(stream_t *s, char *buffer, int max_len)
|
||||
static int write_buffer(stream_t *s, char *buffer, int len)
|
||||
{
|
||||
struct priv *p = s->priv;
|
||||
int r = len;
|
||||
int wr;
|
||||
while (r > 0) {
|
||||
wr = write(p->fd, buffer, r);
|
||||
if (wr <= 0)
|
||||
return -1;
|
||||
r -= wr;
|
||||
buffer += wr;
|
||||
}
|
||||
return len - r;
|
||||
return write(p->fd, buffer, len);
|
||||
}
|
||||
|
||||
static int seek(stream_t *s, int64_t newpos)
|
||||
|
||||
Reference in New Issue
Block a user