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 1AEA74AAFB for ; Wed, 12 Jun 2024 08:51:50 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 76FAA68D7FC; Wed, 12 Jun 2024 11:51:47 +0300 (EEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2EB0268D830 for ; Wed, 12 Jun 2024 11:51:39 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718182305; x=1749718305; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=hnE8sqCVyP5MQ/yLZ0qdN2lT2fi8zaDdch3iDnd7TPk=; b=lNnMNqem8inME7ULX/aDdNXph0Xe/YnDGz1yR7iRXvOUNpMWRnUU+XWC SUS5H65fQt7HsAK1ktZ7QNkgyUk8ERaEkoxl0B0Rgq8iHFOIG2MagLg4l 6Vmexi4uGacRLQIiNiftbNPKHTNScoYa28p1dNevsWPXpLkU9NP16MxLp axbErHcpc2ftbCcNPifPzVxQisHkOAmsvNHc+MHpf20dLagOWycoW0Nhf u86tIuzyMDt7OO7ts0YCOY55GFdN7N7gZGDWGKKPrHLM4oeW2dDw+CvJp 1eLk6M4ma9hSvmoRJUDb9T22lqeMv/1dnphwzszv1ID+dApQYhPXjr2V6 Q==; X-CSE-ConnectionGUID: XwD7+POAR82nVqa9VdkqSg== X-CSE-MsgGUID: zFOwk/1uT2qLwQVjRWnJGg== X-IronPort-AV: E=McAfee;i="6600,9927,11100"; a="32469953" X-IronPort-AV: E=Sophos;i="6.08,232,1712646000"; d="scan'208";a="32469953" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2024 01:51:35 -0700 X-CSE-ConnectionGUID: RZYr8n6AQsa1qT/l3oRA7g== X-CSE-MsgGUID: mf3RJhNZTbqQ6tzizO9Wjw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,232,1712646000"; d="scan'208";a="44284501" Received: from unknown (HELO localhost.localdomain) ([10.239.160.66]) by fmviesa004.fm.intel.com with ESMTP; 12 Jun 2024 01:51:34 -0700 From: tong1.wu-at-intel.com@ffmpeg.org To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jun 2024 16:49:53 +0800 Message-ID: <20240612084953.794-1-tong1.wu@intel.com> X-Mailer: git-send-email 2.41.0.windows.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] lavc/vaapi_encode: correct the timestamp when input_order = decode_delay 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: Tong Wu 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: Tong Wu Fixed the command line: ffmpeg -hwaccel vaapi -pix_fmt nv12 -s:v widthxheight -i input.yuv -vf "hwupload" -c:v hevc_vaapi -bf 10 -b_depth 3 -vframes 3 -f null - Signed-off-by: Tong Wu --- libavcodec/vaapi_encode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c index f54b2579ec..3c627b5ca8 100644 --- a/libavcodec/vaapi_encode.c +++ b/libavcodec/vaapi_encode.c @@ -1383,7 +1383,7 @@ static int vaapi_encode_send_frame(AVCodecContext *avctx, AVFrame *frame) // Fix timestamps if we hit end-of-stream before the initial decode // delay has elapsed. - if (ctx->input_order < ctx->decode_delay) + if (ctx->input_order <= ctx->decode_delay) ctx->dts_pts_diff = ctx->pic_end->pts - ctx->first_pts; } -- 2.41.0.windows.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".