From patchwork Fri Apr 7 04:55:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 3328 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.44.195 with SMTP id s186csp122875vss; Thu, 6 Apr 2017 21:56:36 -0700 (PDT) X-Received: by 10.28.182.69 with SMTP id g66mr118000wmf.112.1491540996572; Thu, 06 Apr 2017 21:56:36 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id i13si2119968wmh.77.2017.04.06.21.56.16; Thu, 06 Apr 2017 21:56:36 -0700 (PDT) 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 9D266688394; Fri, 7 Apr 2017 07:56:09 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B545868832F for ; Fri, 7 Apr 2017 07:56:02 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id E75F7100E43; Fri, 7 Apr 2017 06:56:05 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X6b0uo-0iip2; Fri, 7 Apr 2017 06:56:04 +0200 (CEST) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 8031E100661; Fri, 7 Apr 2017 06:56:04 +0200 (CEST) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Fri, 7 Apr 2017 06:55:52 +0200 Message-Id: <20170407045552.4259-1-cus@passwd.hu> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170406133325.GC7775@sunshine.barsnick.net> References: <20170406133325.GC7775@sunshine.barsnick.net> Subject: [FFmpeg-devel] [PATCHv2] avfilter/vf_framerate: always request input if no output is provided in request_frame 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: Marton Balint MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Fixes ticket #6285. Signed-off-by: Marton Balint --- libavfilter/vf_framerate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_framerate.c b/libavfilter/vf_framerate.c index b4a74f7..0093f78 100644 --- a/libavfilter/vf_framerate.c +++ b/libavfilter/vf_framerate.c @@ -341,7 +341,7 @@ static int blend_frames8(AVFilterContext *ctx, float interpolate, return 0; } -static int process_work_frame(AVFilterContext *ctx, int stop) +static int process_work_frame(AVFilterContext *ctx, int in_filter_frame) { FrameRateContext *s = ctx->priv; int64_t work_next_pts; @@ -360,7 +360,7 @@ static int process_work_frame(AVFilterContext *ctx, int stop) // the filter cannot do anything ff_dlog(ctx, "process_work_frame() no current frame cached: move on to next frame, do not output a frame\n"); next_source(ctx); - return 0; + return in_filter_frame ? 0 : ff_request_frame(ctx->inputs[0]); } work_next_pts = s->pts + s->average_dest_pts_delta; @@ -384,7 +384,7 @@ static int process_work_frame(AVFilterContext *ctx, int stop) ff_dlog(ctx, "process_work_frame() work crnt pts >= srce next pts: SKIP FRAME, move on to next frame, do not output a frame\n"); next_source(ctx); s->pending_srce_frames--; - return 0; + return in_filter_frame ? 0 : ff_request_frame(ctx->inputs[0]); } // calculate interpolation @@ -436,7 +436,7 @@ copy_done: } ff_dlog(ctx, "process_work_frame() output a frame\n"); s->dest_frame_num++; - if (stop) + if (in_filter_frame) s->pending_end_frame = 0; s->last_dest_frame_pts = s->work->pts;