From patchwork Sat Mar 11 19:18:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexis Ballier X-Patchwork-Id: 2891 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.50.79 with SMTP id y76csp578587vsy; Sat, 11 Mar 2017 11:19:28 -0800 (PST) X-Received: by 10.223.156.2 with SMTP id f2mr23815430wrc.4.1489259968176; Sat, 11 Mar 2017 11:19:28 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id j33si17990519wre.332.2017.03.11.11.19.27; Sat, 11 Mar 2017 11:19:28 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gentoo.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 677D7689A7C; Sat, 11 Mar 2017 21:19:10 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 72229689A41 for ; Sat, 11 Mar 2017 21:19:04 +0200 (EET) Received: from localhost.localdomain (dra13-4-78-234-166-189.fbx.proxad.net [78.234.166.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: aballier) by smtp.gentoo.org (Postfix) with ESMTPSA id 38EA43415D2; Sat, 11 Mar 2017 19:19:16 +0000 (UTC) From: Alexis Ballier To: ffmpeg-devel@ffmpeg.org Date: Sat, 11 Mar 2017 20:18:54 +0100 Message-Id: <20170311191855.22983-1-aballier@gentoo.org> X-Mailer: git-send-email 2.12.0 Subject: [FFmpeg-devel] [PATCH 1/2] lavf/vf_framerate: Fix frame leak when increasing framerate. 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: Alexis Ballier MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- Can be reproduced with: ffmpeg -f lavfi -i cellauto,framerate=fps=100 -t 1 -f null - (and your favorite memory debugger). --- libavfilter/vf_framerate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_framerate.c b/libavfilter/vf_framerate.c index 237a4873b3..b4a74f7f7d 100644 --- a/libavfilter/vf_framerate.c +++ b/libavfilter/vf_framerate.c @@ -526,7 +526,7 @@ static av_cold void uninit(AVFilterContext *ctx) FrameRateContext *s = ctx->priv; int i; - for (i = s->frst + 1; i < s->last; i++) { + for (i = s->frst; i < s->last; i++) { if (s->srce[i] && (s->srce[i] != s->srce[i + 1])) av_frame_free(&s->srce[i]); }