From patchwork Thu Mar 9 19:44:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexis Ballier X-Patchwork-Id: 2861 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.50.79 with SMTP id y76csp480022vsy; Thu, 9 Mar 2017 11:45:00 -0800 (PST) X-Received: by 10.223.128.99 with SMTP id 90mr13148731wrk.157.1489088700697; Thu, 09 Mar 2017 11:45:00 -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 124si5450136wmc.106.2017.03.09.11.45.00; Thu, 09 Mar 2017 11:45:00 -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 D44AD688329; Thu, 9 Mar 2017 21:44:42 +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 B15B9688268 for ; Thu, 9 Mar 2017 21:44:36 +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 8931B341691; Thu, 9 Mar 2017 19:44:45 +0000 (UTC) From: Alexis Ballier To: ffmpeg-devel@ffmpeg.org Date: Thu, 9 Mar 2017 20:44:21 +0100 Message-Id: <20170309194421.21379-1-aballier@gentoo.org> X-Mailer: git-send-email 2.12.0 Subject: [FFmpeg-devel] [PATCH] 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]); }