Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Marton Balint <cus@passwd.hu>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v2] avformat/dump: Stream start offsets: change precision and label
Date: Wed, 23 Apr 2025 23:36:08 +0200 (CEST)
Message-ID: <5e0c04e0-4e8c-48bc-664c-41b2fedb9db8@passwd.hu> (raw)
In-Reply-To: <pull.72.v2.ffstaging.FFmpeg.1745350657716.ffmpegagent@gmail.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".

  reply	other threads:[~2025-04-23 21:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-20 20:11 [FFmpeg-devel] [PATCH] avformat/dump: Change precision of stream start offsets softworkz
2025-04-21  4:50 ` Gyan Doshi
2025-04-21 13:28   ` softworkz .
2025-04-21 19:31     ` Marton Balint
2025-04-21 19:50       ` softworkz .
2025-04-21 20:17         ` Marton Balint
2025-04-21 20:52           ` softworkz .
2025-04-22  4:34             ` Gyan Doshi
2025-04-22 19:25               ` Marton Balint
2025-04-22 19:37 ` [FFmpeg-devel] [PATCH v2] avformat/dump: Stream start offsets: change precision and label softworkz
2025-04-23 21:36   ` Marton Balint [this message]
2025-04-25 20:44     ` softworkz .
2025-04-29 21:16   ` [FFmpeg-devel] [PATCH v3] " softworkz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5e0c04e0-4e8c-48bc-664c-41b2fedb9db8@passwd.hu \
    --to=cus@passwd.hu \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git