diff options
author | Marton Balint <cus@passwd.hu> | 2021-11-30 00:50:16 +0100 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2021-12-12 00:32:20 +0100 |
commit | 722d28db129b2e52d19c1a5051ea4ab0a9b84062 (patch) | |
tree | 01f8cfdcb7dce5d8f840607084150016343fecf3 /libavformat/file.c | |
parent | 34aee50a7f5a4b36f9f7daf827422d345c7868ed (diff) | |
download | ffmpeg-722d28db129b2e52d19c1a5051ea4ab0a9b84062.tar.gz |
avformat/file: use proper return value in file_close
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat/file.c')
-rw-r--r-- | libavformat/file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/file.c b/libavformat/file.c index 9c23f680cd..7001750c80 100644 --- a/libavformat/file.c +++ b/libavformat/file.c @@ -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) |