Commit bab09864 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/jacosubdec: use time_internal.h, simplify code

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 013c3eb0
......@@ -29,6 +29,7 @@
#include "jacosub.h"
#include "libavutil/avstring.h"
#include "libavutil/bprint.h"
#include "libavutil/time_internal.h"
#undef time
......@@ -44,11 +45,7 @@ static int insert_datetime(AVBPrint *dst, const char *in, const char *arg)
time_t now = time(0);
struct tm ltime;
#if HAVE_LOCALTIME_R
localtime_r(&now, &ltime);
#else
ltime = *localtime(&now);
#endif
strftime(buf, sizeof(buf), arg, &ltime);
av_bprintf(dst, "%s", buf);
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment