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 31370439ED for ; Tue, 5 Jul 2022 15:25:54 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A05B568B9EF; Tue, 5 Jul 2022 18:25:51 +0300 (EEST) Received: from btbn.de (btbn.de [136.243.74.85]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 127A268B9B9 for ; Tue, 5 Jul 2022 18:25:45 +0300 (EEST) Received: from [authenticated] by btbn.de (Postfix) with ESMTPSA id A36992003AF; Tue, 5 Jul 2022 17:25:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rothenpieler.org; s=mail; t=1657034744; bh=tudsosj4EoSq+mObAThTKEBfNyujGMmIyHaItZQcOXw=; h=From:To:Cc:Subject:Date; b=E4+lOtVfD6qFqJcVLQPHX4J1gmA+jYuYSLekhlW0ODbWuK+XxYEw4hPBLevhtxp1h exsEn2UsBHB1hadPXa5aZfL3EdinirmjrNTAm5TxA8MeGngIDRurxY7ZGjF/IBQV3k v9FIr9BG8R6b9y3CqXSc15wm1mebg9gn5d4B5jXupScBiE5CNYZ8DIlP9I9/mWK3Cg CstPLayTbWvRgP6FUZBUXaiwulKrsNtXKRwmXDgpvSqZwg5e9bLslXT8g7dK+lSaFI 6lNh3W8j52FwSqSdFihOvK0KRjSzfdpIXXoKDtFdPgsCq1BBddMxdIrpfxBECGYNji Hvrf8lx1Ym/Gw== From: Timo Rothenpieler To: ffmpeg-devel@ffmpeg.org Date: Tue, 5 Jul 2022 17:25:26 +0200 Message-Id: <20220705152526.5122-1-timo@rothenpieler.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] fftools/ffmpeg: log correct filter timebase with debug_ts 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: Timo Rothenpieler 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: --- fftools/ffmpeg.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index e7384f052a..6ec28f3019 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -766,6 +766,7 @@ static double adjust_frame_pts_to_encoder_tb(OutputFile *of, OutputStream *ost, { double float_pts = AV_NOPTS_VALUE; // this is identical to frame.pts but with higher precision AVCodecContext *enc = ost->enc_ctx; + AVRational filter_tb = (AVRational){ -1, -1 }; if (!frame || frame->pts == AV_NOPTS_VALUE || !enc || !ost->filter || !ost->filter->graph->graph) goto early_exit; @@ -774,9 +775,9 @@ static double adjust_frame_pts_to_encoder_tb(OutputFile *of, OutputStream *ost, AVFilterContext *filter = ost->filter->filter; int64_t start_time = (of->start_time == AV_NOPTS_VALUE) ? 0 : of->start_time; - AVRational filter_tb = av_buffersink_get_time_base(filter); AVRational tb = enc->time_base; int extra_bits = av_clip(29 - av_log2(tb.den), 0, 16); + filter_tb = av_buffersink_get_time_base(filter); tb.den <<= extra_bits; float_pts = @@ -798,8 +799,8 @@ early_exit: frame ? av_ts2str(frame->pts) : "NULL", frame ? av_ts2timestr(frame->pts, &enc->time_base) : "NULL", float_pts, - enc ? enc->time_base.num : -1, - enc ? enc->time_base.den : -1); + filter_tb.num, + filter_tb.den); } return float_pts; -- 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".