Skip to content

Commit 147a412

Browse files
committed
avfilter/textutils: Use internal gmtime.
1 parent 4a5ae2a commit 147a412

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libavfilter/textutils.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include "libavutil/error.h"
3131
#include "libavutil/file.h"
3232
#include "libavutil/time.h"
33+
#include "libavutil/time_internal.h"
3334

3435
static int ff_expand_text_function_internal(FFExpandTextContext *expand_text, AVBPrint *bp,
3536
char *name, unsigned argc, char **argv)
@@ -189,7 +190,7 @@ int ff_print_pts(void *log_ctx, AVBPrint *bp, double pts, const char *delta,
189190
if (!strcmp(fmt, "localtime"))
190191
localtime_r(&ms, &tm);
191192
else
192-
gmtime_r(&ms, &tm);
193+
ff_gmtime_r(&ms, &tm);
193194
av_bprint_strftime(bp, av_x_if_null(strftime_fmt, "%Y-%m-%d %H:%M:%S"), &tm);
194195
} else {
195196
av_log(log_ctx, AV_LOG_ERROR, "Invalid format '%s'\n", fmt);
@@ -219,7 +220,7 @@ int ff_print_time(void *log_ctx, AVBPrint *bp,
219220
if (localtime)
220221
localtime_r(&now, &tm);
221222
else
222-
tm = *gmtime_r(&now, &tm);
223+
tm = *ff_gmtime_r(&now, &tm);
223224

224225
// manually parse format for %N (fractional seconds)
225226
begin = fmt;

0 commit comments

Comments
 (0)