From patchwork Sat Dec 24 17:41:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas George X-Patchwork-Id: 1907 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.89.21 with SMTP id n21csp383521vsb; Sat, 24 Dec 2016 09:42:47 -0800 (PST) X-Received: by 10.28.60.5 with SMTP id j5mr21295511wma.119.1482601367791; Sat, 24 Dec 2016 09:42:47 -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 lv9si4396389wjb.213.2016.12.24.09.42.47; Sat, 24 Dec 2016 09:42:47 -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 59419689B3D; Sat, 24 Dec 2016 19:42:10 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from nef2.ens.fr (nef2.ens.fr [129.199.96.40]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B9C196899BE for ; Sat, 24 Dec 2016 19:42:02 +0200 (EET) Received: from phare.normalesup.org (archicubes.ens.fr [129.199.129.80]) by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id uBOHg31T095780 for ; Sat, 24 Dec 2016 18:42:03 +0100 (CET) Received: by phare.normalesup.org (Postfix, from userid 1001) id AD411E0087; Sat, 24 Dec 2016 18:42:03 +0100 (CET) From: Nicolas George To: ffmpeg-devel@ffmpeg.org Date: Sat, 24 Dec 2016 18:41:36 +0100 Message-Id: <20161224174149.8995-5-george@nsup.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20161224174149.8995-1-george@nsup.org> References: <20161224174149.8995-1-george@nsup.org> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef2.ens.fr [129.199.96.32]); Sat, 24 Dec 2016 18:42:03 +0100 (CET) Subject: [FFmpeg-devel] [PATCH 04/17] lavfi: merge two variables after a recent commit. 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Nicolas George --- libavfilter/avfilter.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 2de5a0ea78..83daef4609 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -1098,7 +1098,6 @@ static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame) int (*filter_frame)(AVFilterLink *, AVFrame *); AVFilterContext *dstctx = link->dst; AVFilterPad *dst = link->dstpad; - AVFrame *out = NULL; int ret; AVFilterCommand *cmd= link->dst->command_queue; int64_t pts; @@ -1111,9 +1110,8 @@ static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame) if (ret < 0) goto fail; } - out = frame; /* TODO rename */ - while(cmd && cmd->time <= out->pts * av_q2d(link->time_base)){ + while(cmd && cmd->time <= frame->pts * av_q2d(link->time_base)){ av_log(link->dst, AV_LOG_DEBUG, "Processing command time:%f command:%s arg:%s\n", cmd->time, cmd->command, cmd->arg); @@ -1122,9 +1120,9 @@ static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame) cmd= link->dst->command_queue; } - pts = out->pts; + pts = frame->pts; if (dstctx->enable_str) { - int64_t pos = av_frame_get_pkt_pos(out); + int64_t pos = av_frame_get_pkt_pos(frame); dstctx->var_values[VAR_N] = link->frame_count_out; dstctx->var_values[VAR_T] = pts == AV_NOPTS_VALUE ? NAN : pts * av_q2d(link->time_base); dstctx->var_values[VAR_W] = link->w; @@ -1136,13 +1134,12 @@ static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame) (dstctx->filter->flags & AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC)) filter_frame = default_filter_frame; } - ret = filter_frame(link, out); + ret = filter_frame(link, frame); link->frame_count_out++; ff_update_link_current_pts(link, pts); return ret; fail: - av_frame_free(&out); av_frame_free(&frame); return ret; }