mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
return error code if error happens
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
f22bc68dc0
commit
4052bf69ac
@ -37,13 +37,15 @@
|
||||
static int file_read(URLContext *h, unsigned char *buf, int size)
|
||||
{
|
||||
int fd = (intptr_t) h->priv_data;
|
||||
return read(fd, buf, size);
|
||||
int r = read(fd, buf, size);
|
||||
return (-1 == r)?AVERROR(errno):r;
|
||||
}
|
||||
|
||||
static int file_write(URLContext *h, const unsigned char *buf, int size)
|
||||
{
|
||||
int fd = (intptr_t) h->priv_data;
|
||||
return write(fd, buf, size);
|
||||
int r = write(fd, buf, size);
|
||||
return (-1 == r)?AVERROR(errno):r;
|
||||
}
|
||||
|
||||
static int file_get_handle(URLContext *h)
|
||||
|
Loading…
Reference in New Issue
Block a user