From patchwork Mon Feb 22 07:30:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Guo, Yejun" X-Patchwork-Id: 25885 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 9EB5A448857 for ; Mon, 22 Feb 2021 09:41:25 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8122468A82B; Mon, 22 Feb 2021 09:41:25 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6D6F368A199 for ; Mon, 22 Feb 2021 09:41:19 +0200 (EET) IronPort-SDR: MhExuACibUjK5vDp9kc/RuaqAUkJLpq2RuByCkZ5sJy9MUUfsyHGmqDHkymhFv+2Dr90SViwAe pYIkVWJhB/fg== X-IronPort-AV: E=McAfee;i="6000,8403,9902"; a="269295441" X-IronPort-AV: E=Sophos;i="5.81,196,1610438400"; d="scan'208";a="269295441" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Feb 2021 23:41:17 -0800 IronPort-SDR: f02BF97S5rWVHj/oH1pc8DtXf6RSaxX/2vw93I8TjHvIphSMfTOGt2YRKUYR5V+NYZfoweCpIV Hmcwpw739zfQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,196,1610438400"; d="scan'208";a="441300986" Received: from yguo18-skl-u1604.sh.intel.com ([10.239.159.53]) by orsmga001.jf.intel.com with ESMTP; 21 Feb 2021 23:41:13 -0800 From: "Guo, Yejun" To: ffmpeg-devel@ffmpeg.org Date: Mon, 22 Feb 2021 15:30:44 +0800 Message-Id: <20210222073045.16070-2-yejun.guo@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210222073045.16070-1-yejun.guo@intel.com> References: <20210222073045.16070-1-yejun.guo@intel.com> Subject: [FFmpeg-devel] [PATCH V3 2/3] libavfilter/buffersink.c: unref private_ref when frame leaves libavfilter 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: yejun.guo@intel.com MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- libavfilter/buffersink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c index 58848941d4..837a6e9e82 100644 --- a/libavfilter/buffersink.c +++ b/libavfilter/buffersink.c @@ -98,6 +98,7 @@ static int return_or_keep_frame(BufferSinkContext *buf, AVFrame *out, AVFrame *i } else { av_assert1(out); buf->peeked_frame = NULL; + av_buffer_unref(&in->private_ref); av_frame_move_ref(out, in); av_frame_free(&in); return 0;