From 508dcf95aa0045ccc776adf4dd6d229d980a4c13 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Wed, 28 Feb 2024 19:47:50 +0100 Subject: [PATCH] avutil/timestamp: Constify av_ts_make_time_string() (Actually, the time base should be passed by value.) Signed-off-by: Andreas Rheinhardt Signed-off-by: Paul B Mahol --- libavutil/timestamp.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavutil/timestamp.h b/libavutil/timestamp.h index 9ae64da8a1..2b37781eba 100644 --- a/libavutil/timestamp.h +++ b/libavutil/timestamp.h @@ -62,7 +62,8 @@ static inline char *av_ts_make_string(char *buf, int64_t ts) * @param tb the timebase of the timestamp * @return the buffer in input */ -static inline char *av_ts_make_time_string(char *buf, int64_t ts, AVRational *tb) +static inline char *av_ts_make_time_string(char *buf, int64_t ts, + const AVRational *tb) { if (ts == AV_NOPTS_VALUE) snprintf(buf, AV_TS_MAX_STRING_SIZE, "NOPTS"); else snprintf(buf, AV_TS_MAX_STRING_SIZE, "%.6g", av_q2d(*tb) * ts);