From patchwork Wed Mar 14 18:24:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bodecs Bela X-Patchwork-Id: 7996 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.1.70 with SMTP id c67csp376889jad; Wed, 14 Mar 2018 11:24:42 -0700 (PDT) X-Google-Smtp-Source: AG47ELtPU+3wrOggsWDEraNZ/WKTFIC3urT7WfljdfSuc5q2qwCliIVjXGDQN62w++anjIT5x82O X-Received: by 10.223.189.8 with SMTP id j8mr5033586wrh.20.1521051882696; Wed, 14 Mar 2018 11:24:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521051882; cv=none; d=google.com; s=arc-20160816; b=bahXpVePFea708quK3zQbtMEa5in+ZJ63m5XIe2eIyZSSjxLu6Ux8EfAD42M1wrEbu meXsJBdzUGlkEjv8dMV7QL1Ns8Fax7RHnyWH4HvFv4JYoxn5JzQhMSJ1c4TVT1/Ynlno zieqvPOQcQherxG+/yF6UHVplVAFkMutGHD8ZmrmQ2Hp/vRetGmGaV24uoajymVtV1LE 1LoM8xngDPqUhZaMfCw0NkTDNBcyZzvB7GDM4OQE2+aPLAHDAOZ1Fy3ZA60at1TJYnxw RiVVnxK/Kf+EsJzalim/PTNsR7z5k6b+EUySOmvW5WqFWckqP7iZht7Yyjd5wW0+9Qmz 7/Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject :content-language:mime-version:user-agent:date:message-id:from:to :delivered-to:arc-authentication-results; bh=87n5N8358vqJAmF7lxpnAf6oRzH9nSKf8yPv6qDKj44=; b=iMtCNJaLkwPJ/CAc+HtSxMt2Bs0bDuW+lWx9PbafLBOOMF8WajnF8XfF30I6cEVBMi 2AGESo6FEcE1e6bwlZyScprhY+yt4TDxiZYG14lwZ8QiGgmUSsH7UkrhOfEWu/8nM/zd t5dbaylwUc0Ba4u6izK7DlrCFnfmMrwCQibD0oz1IatzJv8+8qAKXq5MGCWTCwbeqwMu 6dXnmGJuNf8pXJFPBFEq+7OZqRxYcaAvgLzVKoJs3whsXSzDcbfdXoBjyhjZb0tsY94Z 9+xxtu8dHg57DcBaAoKpPZRrV6wHDEOnAI6aau0EHcZG25gaaWUbLrwpLKjYRs3q82Qp 5bcA== ARC-Authentication-Results: i=1; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id t189si1309946wmd.242.2018.03.14.11.24.41; Wed, 14 Mar 2018 11:24:42 -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 43F6768A1EE; Wed, 14 Mar 2018 20:24:28 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-xsmtp1.externet.hu (mail-xsmtp4.externet.hu [212.40.96.155]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 37190689DD6 for ; Wed, 14 Mar 2018 20:24:22 +0200 (EET) Received: (qmail 762 invoked from network); 14 Mar 2018 18:24:33 -0000 Received: from 41-244.vivanet.hu (HELO ?192.168.69.250?) (bodecsb@vivanet.hu@217.173.41.244) by 0 with ESMTPA; 14 Mar 2018 18:24:33 -0000 To: FFmpeg development discussions and patches From: Bodecs Bela Message-ID: Date: Wed, 14 Mar 2018 19:24:31 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Language: hu Subject: [FFmpeg-devel] [PATCH]avfilter/astreamslect: fixing activating in some cases 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Dear All, In case of some content, astreamselect filter remains in non active state. please review this pacth. I am not sure this is the right fix of this. thank you, in advance! Bela Bodecs From acd81c80b8b5b33b03e99adb3bad04bc291e4218 Mon Sep 17 00:00:00 2001 From: Bela Bodecs Date: Wed, 14 Mar 2018 19:22:03 +0100 Subject: [PATCH] avfilter/f_astreamselect: fixing activating in some cases In case of some content, astreamselect filter remains in non active state. Signed-off-by: Bela Bodecs --- libavfilter/f_streamselect.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavfilter/f_streamselect.c b/libavfilter/f_streamselect.c index 923deb1..2aef3f4 100644 --- a/libavfilter/f_streamselect.c +++ b/libavfilter/f_streamselect.c @@ -25,6 +25,7 @@ #include "framesync.h" #include "internal.h" #include "video.h" +#include "filters.h" typedef struct StreamSelectContext { const AVClass *class; @@ -66,8 +67,10 @@ static int process_frame(FFFrameSync *fs) AVFrame *out; if (s->is_audio && s->last_pts[j] == in[j]->pts && - ctx->outputs[i]->frame_count_in > 0) + ctx->outputs[i]->frame_count_in > 0) { + ff_filter_set_ready(ctx->outputs[i]->src, 200); continue; + } out = av_frame_clone(in[j]); if (!out) return AVERROR(ENOMEM);