[FFmpeg-cvslog] avutil/timestamp: Constify av_ts_make_time_string()

Andreas Rheinhardt git at videolan.org
Sat Mar 2 05:06:40 EET 2024


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Wed Feb 28 19:47:50 2024 +0100| [58e3ef7f54685f967acd06a71de624882258902d] | committer: Andreas Rheinhardt

avutil/timestamp: Constify av_ts_make_time_string()

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

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=58e3ef7f54685f967acd06a71de624882258902d
---

 doc/APIchanges        | 3 +++
 libavutil/timestamp.h | 3 ++-
 libavutil/version.h   | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index a1eecea9fd..fb2b1440fb 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2023-02-09
 
 API changes, most recent first:
 
+2024-02-28 - xxxxxxxxxx - lavu 58.40.100 - timestamp.h
+  av_ts_make_time_string() now accepts a pointer to const AVRational.
+
 2024-02-28 - xxxxxxxxxx - lavf 60.23.100 - avio.h
   avio_print_string_array() now accepts an array of const pointers.
 
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);
diff --git a/libavutil/version.h b/libavutil/version.h
index 9f45af93df..3fbc292a68 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -79,7 +79,7 @@
  */
 
 #define LIBAVUTIL_VERSION_MAJOR  58
-#define LIBAVUTIL_VERSION_MINOR  39
+#define LIBAVUTIL_VERSION_MINOR  40
 #define LIBAVUTIL_VERSION_MICRO 100
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \



More information about the ffmpeg-cvslog mailing list