From patchwork Wed Apr 5 00:03:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 3294 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.44.195 with SMTP id s186csp24515vss; Tue, 4 Apr 2017 17:03:17 -0700 (PDT) X-Received: by 10.28.142.133 with SMTP id q127mr6727847wmd.116.1491350596972; Tue, 04 Apr 2017 17:03:16 -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 k206si21937114wmf.165.2017.04.04.17.03.16; Tue, 04 Apr 2017 17:03:16 -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 E52DC688280; Wed, 5 Apr 2017 03:03:10 +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 0A0BE680C95 for ; Wed, 5 Apr 2017 03:03:04 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id D33CE103025; Wed, 5 Apr 2017 02:03: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 vTKo3444X83r; Wed, 5 Apr 2017 02:03:04 +0200 (CEST) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 931A6103015; Wed, 5 Apr 2017 02:03:04 +0200 (CEST) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Wed, 5 Apr 2017 02:03:00 +0200 Message-Id: <20170405000300.25055-1-cus@passwd.hu> X-Mailer: git-send-email 2.10.2 Subject: [FFmpeg-devel] [PATCH] 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..45fab25 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 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 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 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 (filter_frame) s->pending_end_frame = 0; s->last_dest_frame_pts = s->work->pts;