From patchwork Tue Nov 30 00:49:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 31824 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp6968349iob; Mon, 29 Nov 2021 16:50:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjGsnZ8JnMLM6Z0pCLGMjNqg35+Jt7YFTs1jfLO13UP/wAdgsKi+prFYEVhR2zJUARsnCY X-Received: by 2002:a50:ef02:: with SMTP id m2mr77309983eds.172.1638233411518; Mon, 29 Nov 2021 16:50:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638233411; cv=none; d=google.com; s=arc-20160816; b=RWUID4UK9DRi4d0hNYv/k1vexx4gwrnKra3n0JVwRdbfhAGIZvTw+DtN3eJrdM/5x/ OO8ptPyLVe99kyN1EZZJfu2kM1iuSoYVUwdA1eUcln+2TAG3pACr8l+LdnDRsLsTucix 0JJzIksDV5MjyGypm9sYezwlbLVb9ivSsKbM+3Swh0p88opc3MEubrkTFLh3A7rDVw8X AlSAfjhCjyV94gOAHSh3p0XIgIg25BXqGhKhPvbdAJXpMDy3+QK8VC9vonHsKWoswTiD vnIakTjnOvbqIHwrudCHvtXEarGcE8d706ugmNrrPDQxLjN9rRGhtsTGy+e4BG2krvL6 aRvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=O5+fhLB26IxTLcaQA6mmLh0kuW98urqh87dhiVp78fM=; b=AZe9DsTM2PuBgB4V+AYcbFH16jbd7XpzdzBnrqFge3o8SFUsc9Itlj63WgwZe935yV NJ7i70gLGftG6B8fE5s71l4f+DE8imD+VPDG3YgDesw5bLiuoAN9AyZ30t7jupLldrjI tsEuRUNCa4a084Ns/e5Xhx+VINndrxFi/xq2IP+Uh85tkYvD56rR+r2qhyf6/Oqq3OZU x2uo3FNnPoRA8UOVzJJspiHgOzSv3V1gkT8PoMyO8ckR9wZlmV1dssreWW/cEo/Vpgz/ smCOe75gjx7byWqbq4qNoh9iOITdrJPZZZ/2ds5ZCi68nofSvevWAXvFR0kFt1loBJPQ gdkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id i7si35537730edc.414.2021.11.29.16.50.10; Mon, 29 Nov 2021 16:50:11 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A35BE68AE34; Tue, 30 Nov 2021 02:50:05 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D4FCA68A868 for ; Tue, 30 Nov 2021 02:49:58 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 3987AE643C; Tue, 30 Nov 2021 01:49:58 +0100 (CET) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gCk9UfieTEg9; Tue, 30 Nov 2021 01:49:56 +0100 (CET) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 9B5C3E3E38; Tue, 30 Nov 2021 01:49:56 +0100 (CET) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Tue, 30 Nov 2021 01:49:46 +0100 Message-Id: <20211130004950.30697-1-cus@passwd.hu> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/5] avformat/file: use proper return value in file_close X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Marton Balint Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: FVYGm38fIOik Signed-off-by: Marton Balint --- libavformat/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)