From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 4C01046F89 for ; Mon, 24 Jul 2023 02:37:17 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5366468C71B; Mon, 24 Jul 2023 05:37:15 +0300 (EEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4B91068C53B for ; Mon, 24 Jul 2023 05:37:07 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690166233; x=1721702233; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=xPSDgL/QyEWQa71DfCUzxQrrdMwM71x+e+Jp6n5k1W8=; b=jfJzQJ8kEhBm3uT6/w9egCg1l/uMq4wNZpGaR8pal26HjMhaA4L8NRxj C1GF+u9877b1BE2fmjo+WJpWwCrSrDC9WHnybR/TK8I81F64/ZvviINRK hPPgaQRsRk1SrZG2reJ0NmgHoWQJ/YzITJKrD4SSuv2+VL9b4JR2Nhj0g CgbBttlK2mIqhsSIgqK68Yx9bdqNdK83spqCUmNNvabyROZdGjHL0vCZc vmWvakw2lacS21Kl+TOwgWVFFXMrDsWcwl8osER1iLjCj0vKJe0ZCGSSQ tkkIej1fpEfZOpD/+caCqQn+TkdSg1v3MxBjJwQI+7BL52AtrN6WVbKf+ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10780"; a="347617613" X-IronPort-AV: E=Sophos;i="6.01,228,1684825200"; d="scan'208";a="347617613" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2023 19:37:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10780"; a="755136894" X-IronPort-AV: E=Sophos;i="6.01,228,1684825200"; d="scan'208";a="755136894" Received: from xhh-tgl64.sh.intel.com ([10.238.2.19]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2023 19:37:03 -0700 From: "Xiang, Haihao" To: ffmpeg-devel@ffmpeg.org Date: Mon, 24 Jul 2023 10:36:51 +0800 Message-Id: <20230724023651.407929-1-haihao.xiang@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] lavfi/vf_vpp_qsv: fix duration in pass-through mode X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: Haihao Xiang Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Haihao Xiang Signed-off-by: Haihao Xiang --- libavfilter/vf_vpp_qsv.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index 334a86551b..be9bf54743 100644 --- a/libavfilter/vf_vpp_qsv.c +++ b/libavfilter/vf_vpp_qsv.c @@ -582,6 +582,11 @@ static int activate(AVFilterContext *ctx) if (in->pts != AV_NOPTS_VALUE) in->pts = av_rescale_q(in->pts, inlink->time_base, outlink->time_base); + if (outlink->frame_rate.num && outlink->frame_rate.den) + in->duration = av_rescale_q(1, av_inv_q(outlink->frame_rate), outlink->time_base); + else + in->duration = 0; + ret = ff_filter_frame(outlink, in); if (ret < 0) return ret; -- 2.34.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".