summaryrefslogtreecommitdiffstats
path: root/media/ffvpx/libavutil/timestamp.h
diff options
context:
space:
mode:
Diffstat (limited to 'media/ffvpx/libavutil/timestamp.h')
-rw-r--r--media/ffvpx/libavutil/timestamp.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/media/ffvpx/libavutil/timestamp.h b/media/ffvpx/libavutil/timestamp.h
index 9ae64da8a1..fa53a46b98 100644
--- a/media/ffvpx/libavutil/timestamp.h
+++ b/media/ffvpx/libavutil/timestamp.h
@@ -62,11 +62,18 @@ 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)
+char *av_ts_make_time_string2(char *buf, int64_t ts, AVRational tb);
+
+/**
+ * Fill the provided buffer with a string containing a timestamp
+ * representation.
+ *
+ * @see av_ts_make_time_string2
+ */
+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);
- return buf;
+ return av_ts_make_time_string2(buf, ts, *tb);
}
/**