[FFmpeg-cvslog] avfilter/vf_drawtext: use gm_time_r() for thread saftey

Michael Niedermayer git at videolan.org
Sun Nov 2 19:29:01 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Nov  2 19:20:26 2014 +0100| [013c3eb05cbb58add0650165828d5cbf2e2e5e39] | committer: Michael Niedermayer

avfilter/vf_drawtext: use gm_time_r() for thread saftey

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=013c3eb05cbb58add0650165828d5cbf2e2e5e39
---

 libavfilter/vf_drawtext.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 857dee6..d20f805 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -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;
 }



More information about the ffmpeg-cvslog mailing list