avformat/file: use proper return value in file_close

Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
Marton Balint 2021-11-30 00:50:16 +01:00
parent 34aee50a7f
commit 722d28db12
1 changed files with 2 additions and 1 deletions

View File

@ -266,7 +266,8 @@ static int64_t file_seek(URLContext *h, int64_t pos, int whence)
static int file_close(URLContext *h)
{
FileContext *c = h->priv_data;
return close(c->fd);
int ret = close(c->fd);
return (ret == -1) ? AVERROR(errno) : 0;
}
static int file_open_dir(URLContext *h)