From patchwork Tue Jun 18 10:45:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 13599 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id B9BC3448385 for ; Tue, 18 Jun 2019 14:06:40 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8663F68A935; Tue, 18 Jun 2019 14:06:40 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-oi1-f194.google.com (mail-oi1-f194.google.com [209.85.167.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9A6E2689ADE for ; Tue, 18 Jun 2019 14:06:34 +0300 (EEST) Received: by mail-oi1-f194.google.com with SMTP id g7so8366666oia.8 for ; Tue, 18 Jun 2019 04:06:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YSyA6R9d1DuUsqE26lNuYXI3zjkvnaunILo81R/PEMc=; b=Omo5gHJXvNaPCmQqhwEqHmI+JfeBYDGJOLpedNbjia0nq/u1+Y7ig9CSCP+k/qNEZN k5gKAePhle4aSyGVZ+1W8U6AmYz7HiGgZA3OXO3Np3agIhd61DeDFCdya3AhpcLCResA X9a0bLpqNXnBVVFKjq2B8/eWYbl4n58Oqk1tYQhuYcuvUy/RD380QD+vzyc2LfUdLjPQ 2JBb5PbwxklJmZ7fX9+YVzzNjcWVyzgXT62qimRTJ7mWd9PRDuC3nt+ZP1VrCBNDhVb3 L0gSGk2PfuId+ojVn33dWXgo1FPtjQ2H8fxsvWNPTWyqA7uRlfplylPJGhOC5NJSA4Ri cfxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YSyA6R9d1DuUsqE26lNuYXI3zjkvnaunILo81R/PEMc=; b=UK+TE5t0LSx49ktZdaR7qF+jUsvxph1OyJz9XOD2Q5/7iYlcz/oqVs5y6g8fcJwtxb YDQCAs6DHjix+tUHBjBwoajX431J5uyq0rBK94eaKSmhbuz0QYqWDiqsEiELo5Ms7eDr wKXlwRP98efLKNwwW196hyIKDxw0NPcZauFyIJAJ9q0wuds/BbUdAEWX2wGiMrusacy0 IBo1rKCnCd+ouOPy0y+Zs+vOo4Yi4uQT0SvOEtZdhXFgQM6m/Fjg/TxnUR155B8r3bWv wFKt+KW/bS9Jtq8Qsl4iKCgSRtTXVHCVBGwkbvw7VgYoA5m3gzv9Su5Ijnlk3WkvUPGh nX/w== X-Gm-Message-State: APjAAAUrACOgdQADHYlmgMBfbfvZtnYdY/Upj7apQcG3NVgu8o6UYQgs 3FOOucWwkT3GSsAS9Tf886s9NCWmFuU= X-Google-Smtp-Source: APXvYqx0kFstrga6JZ6S6cWfBBqZ4V39008eieA+uHIeERtDQZxi4xfKTbhgMiN/Ia33OQn4y0++Zg== X-Received: by 2002:a63:8249:: with SMTP id w70mr2068782pgd.33.1560854736957; Tue, 18 Jun 2019 03:45:36 -0700 (PDT) Received: from localhost.localdomain ([47.90.99.151]) by smtp.gmail.com with ESMTPSA id 139sm14972048pfw.152.2019.06.18.03.45.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 18 Jun 2019 03:45:36 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Tue, 18 Jun 2019 18:45:12 +0800 Message-Id: <20190618104513.19549-1-lance.lmwang@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v1 1/2] libavformat/avio: Fix for the unexpected file close which will cause fd 0 is closed X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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: Limin Wang Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Limin Wang Signed-off-by: Limin Wang --- libavformat/avio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavformat/avio.c b/libavformat/avio.c index 663789ec02..c1d10ee8c3 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -568,7 +568,6 @@ int avio_open_dir(AVIODirContext **s, const char *url, AVDictionary **options) fail: av_free(ctx); *s = NULL; - ffurl_close(h); return ret; } @@ -594,7 +593,6 @@ int avio_close_dir(AVIODirContext **s) return AVERROR(EINVAL); h = (*s)->url_context; h->prot->url_close_dir(h); - ffurl_close(h); av_freep(s); *s = NULL; return 0;