From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 33F604DC17 for <ffmpegdev@gitmailbox.com>; Wed, 23 Apr 2025 21:39:03 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7077668AE6B; Thu, 24 Apr 2025 00:38:58 +0300 (EEST) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 849F3689ABD for <ffmpeg-devel@ffmpeg.org>; Thu, 24 Apr 2025 00:38:51 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id A4EA3EB7E1 for <ffmpeg-devel@ffmpeg.org>; Wed, 23 Apr 2025 23:36:10 +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 l-6891NQiTB3 for <ffmpeg-devel@ffmpeg.org>; Wed, 23 Apr 2025 23:36:08 +0200 (CEST) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id 51E79EB7D4 for <ffmpeg-devel@ffmpeg.org>; Wed, 23 Apr 2025 23:36:08 +0200 (CEST) Date: Wed, 23 Apr 2025 23:36:08 +0200 (CEST) From: Marton Balint <cus@passwd.hu> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> In-Reply-To: <pull.72.v2.ffstaging.FFmpeg.1745350657716.ffmpegagent@gmail.com> Message-ID: <5e0c04e0-4e8c-48bc-664c-41b2fedb9db8@passwd.hu> References: <pull.72.ffstaging.FFmpeg.1745179871512.ffmpegagent@gmail.com> <pull.72.v2.ffstaging.FFmpeg.1745350657716.ffmpegagent@gmail.com> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH v2] avformat/dump: Stream start offsets: change precision and label X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> Archived-At: <https://master.gitmailbox.com/ffmpegdev/5e0c04e0-4e8c-48bc-664c-41b2fedb9db8@passwd.hu/> List-Archive: <https://master.gitmailbox.com/ffmpegdev/> List-Post: <mailto:ffmpegdev@gitmailbox.com> On Tue, 22 Apr 2025, softworkz wrote: > From: softworkz <softworkz@hotmail.com> > > - Change precision to 6 digits to align with other printed times > - Change label to just "Start" > - Add 's' unit to format 'start' value for consistency Please make it consistent by removing the 's'. Chapter start/end times also omit the measurement unit designation. I don't believe it is confusing for anybody. Thanks, Marton > > Signed-off-by: softworkz <softworkz@hotmail.com> > --- > avformat/dump: Change precision of stream start offsets > > Changing this to 6 digits to align with other printed times > > Signed-off-by: softworkz softworkz@hotmail.com > > > Versions > ======== > > V2 > > Following comments from Gyan and Marton: > > * Change precision to 6 digits to align with other printed times > * Change label to just "Start" > * Add 's' unit to format 'start' value for consistency > > Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-72%2Fsoftworkz%2Fsubmit_start_offsets-v2 > Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-72/softworkz/submit_start_offsets-v2 > Pull-Request: https://github.com/ffstaging/FFmpeg/pull/72 > > Range-diff vs v1: > > 1: 5f3052624c ! 1: 6ae8a0da2b avformat/dump: Change precision of stream start offsets > @@ Metadata > Author: softworkz <softworkz@hotmail.com> > > ## Commit message ## > - avformat/dump: Change precision of stream start offsets > + avformat/dump: Stream start offsets: change precision and label > > - Changing this to 6 digits to align with other > - printed times > + - Change precision to 6 digits to align with other printed times > + - Change label to just "Start" > + - Add 's' unit to format 'start' value for consistency > > Signed-off-by: softworkz <softworkz@hotmail.com> > > @@ libavformat/dump.c: FF_ENABLE_DEPRECATION_WARNINGS > if (st->start_time != AV_NOPTS_VALUE && st->start_time != 0 && st->time_base.den && st->time_base.num) { > const double stream_start = av_q2d(st->time_base) * st->start_time; > - av_log(NULL, AV_LOG_INFO, ", Start-Time %.3fs", stream_start); > -+ av_log(NULL, AV_LOG_INFO, ", Start-Time %.6fs", stream_start); > ++ av_log(NULL, AV_LOG_INFO, ", Start %.6fs", stream_start); > } > > dump_disposition(st->disposition, log_level); > +@@ libavformat/dump.c: void av_dump_format(AVFormatContext *ic, int index, > + av_log(NULL, AV_LOG_INFO, ", start: "); > + secs = llabs(ic->start_time / AV_TIME_BASE); > + us = llabs(ic->start_time % AV_TIME_BASE); > +- av_log(NULL, AV_LOG_INFO, "%s%d.%06d", > ++ av_log(NULL, AV_LOG_INFO, "%s%d.%06ds", > + ic->start_time >= 0 ? "" : "-", > + secs, > + (int) av_rescale(us, 1000000, AV_TIME_BASE)); > > > libavformat/dump.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavformat/dump.c b/libavformat/dump.c > index 8c7db7b275..dacedd5ef1 100644 > --- a/libavformat/dump.c > +++ b/libavformat/dump.c > @@ -680,7 +680,7 @@ FF_ENABLE_DEPRECATION_WARNINGS > > if (st->start_time != AV_NOPTS_VALUE && st->start_time != 0 && st->time_base.den && st->time_base.num) { > const double stream_start = av_q2d(st->time_base) * st->start_time; > - av_log(NULL, AV_LOG_INFO, ", Start-Time %.3fs", stream_start); > + av_log(NULL, AV_LOG_INFO, ", Start %.6fs", stream_start); > } > > dump_disposition(st->disposition, log_level); > @@ -883,7 +883,7 @@ void av_dump_format(AVFormatContext *ic, int index, > av_log(NULL, AV_LOG_INFO, ", start: "); > secs = llabs(ic->start_time / AV_TIME_BASE); > us = llabs(ic->start_time % AV_TIME_BASE); > - av_log(NULL, AV_LOG_INFO, "%s%d.%06d", > + av_log(NULL, AV_LOG_INFO, "%s%d.%06ds", > ic->start_time >= 0 ? "" : "-", > secs, > (int) av_rescale(us, 1000000, AV_TIME_BASE)); > > base-commit: 853e66a0726b0a9d6d6269a22f6f9b5be7763738 > -- > ffmpeg-codebot > _______________________________________________ > 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". > _______________________________________________ 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".