]> git.sesse.net Git - ffmpeg/commitdiff
drawtext: Remove the ifdef for localtime_r
authorMartin Storsjö <martin@martin.st>
Fri, 24 Oct 2014 07:59:34 +0000 (10:59 +0300)
committerMartin Storsjö <martin@martin.st>
Sat, 25 Oct 2014 21:14:54 +0000 (00:14 +0300)
If it isn't available in the system, we've got a fallback to
the normal localtime function, so normal code can assume it is
available as long as time_internal.h is included.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavfilter/vf_drawtext.c

index d954fdf2cda447ea27be77ee489de4630374970b..54a8847ced313de6b9bb457220e7be4e83228121 100644 (file)
@@ -47,6 +47,7 @@
 #include "libavutil/random_seed.h"
 #include "libavutil/parseutils.h"
 #include "libavutil/pixdesc.h"
+#include "libavutil/time_internal.h"
 #include "libavutil/tree.h"
 #include "libavutil/lfg.h"
 #include "avfilter.h"
@@ -535,8 +536,6 @@ static int dtext_prepare_text(AVFilterContext *ctx)
     Glyph dummy = { 0 };
     int width  = ctx->inputs[0]->w;
     int height = ctx->inputs[0]->h;
-
-#if HAVE_LOCALTIME_R
     time_t now = time(0);
     struct tm ltime;
     uint8_t *buf = s->expanded_text;
@@ -558,7 +557,6 @@ static int dtext_prepare_text(AVFilterContext *ctx)
         return AVERROR(ENOMEM);
     text = s->expanded_text = buf;
     s->expanded_text_size = buf_size;
-#endif
 
     if ((len = strlen(text)) > s->nb_positions) {
         FT_Vector *p = av_realloc(s->positions,