Message ID | 20211130004950.30697-1-cus@passwd.hu |
---|---|
State | Accepted |
Commit | 722d28db129b2e52d19c1a5051ea4ab0a9b84062 |
Headers | show |
Series | [FFmpeg-devel,1/5] avformat/file: use proper return value in file_close | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/make_ppc | success | Make finished |
andriy/make_fate_ppc | success | Make fate finished |
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)
Signed-off-by: Marton Balint <cus@passwd.hu> --- libavformat/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)