avfilter/vf_drawtext: use gm_time_r() for thread saftey
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 2 Nov 2014 18:20:26 +0000 (19:20 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 2 Nov 2014 18:20:26 +0000 (19:20 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/vf_drawtext.c

index 857dee6..d20f805 100644 (file)
@@ -855,7 +855,7 @@ static int func_strftime(AVFilterContext *ctx, AVBPrint *bp,
     if (tag == 'L')
         localtime_r(&now, &tm);
     else
-        tm = *gmtime(&now);
+        tm = *gmtime_r(&now, &tm);
     av_bprint_strftime(bp, fmt, &tm);
     return 0;
 }