mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/jacosubdec: use time_internal.h, simplify code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
013c3eb05c
commit
bab09864b4
|
@ -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, <ime);
|
||||
#else
|
||||
ltime = *localtime(&now);
|
||||
#endif
|
||||
strftime(buf, sizeof(buf), arg, <ime);
|
||||
av_bprintf(dst, "%s", buf);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue