avutil/timestamp: Constify av_ts_make_time_string()

(Actually, the time base should be passed by value.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Andreas Rheinhardt 2024-02-28 19:47:50 +01:00 committed by Paul B Mahol
parent a03262ad04
commit 508dcf95aa

View File

@ -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);