Browse code

avfilter/vf_drawtext: use gm_time_r() for thread saftey

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2014/11/03 03:20:26
Showing 1 changed files
... ...
@@ -855,7 +855,7 @@ static int func_strftime(AVFilterContext *ctx, AVBPrint *bp,
855 855
     if (tag == 'L')
856 856
         localtime_r(&now, &tm);
857 857
     else
858
-        tm = *gmtime(&now);
858
+        tm = *gmtime_r(&now, &tm);
859 859
     av_bprint_strftime(bp, fmt, &tm);
860 860
     return 0;
861 861
 }