mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-23 03:29:43 +00:00
avformat/unix: fix handling of EOF in case of SOCK_STREAM.
When recv() returns 0 in case of SOCK_STREAM type, it means EOF and with this patch returns value accordingly. Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
This commit is contained in:
parent
36cf3eb76a
commit
1b45e6db22
@ -111,6 +111,8 @@ static int unix_read(URLContext *h, uint8_t *buf, int size)
|
||||
return ret;
|
||||
}
|
||||
ret = recv(s->fd, buf, size, 0);
|
||||
if (!ret && s->type == SOCK_STREAM)
|
||||
return AVERROR_EOF;
|
||||
return ret < 0 ? ff_neterrno() : ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user