1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avformat/hlsenc: Assume UTC if "%z" is unsupported in strftime()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2016-09-13 23:06:06 +02:00
parent 22ba9a3cb8
commit 9f18a970b2

View File

@ -545,7 +545,8 @@ static int hls_window(AVFormatContext *s, int last)
milli = av_clip(lrint(1000*(prog_date_time - tt)), 0, 999);
tm = localtime_r(&tt, &tmpbuf);
strftime(buf0, sizeof(buf0), "%Y-%m-%dT%H:%M:%S", tm);
strftime(buf1, sizeof(buf1), "%z", tm);
if (!strftime(buf1, sizeof(buf1), "%z", tm))
av_strlcpy(buf1, "Z", sizeof(buf1));
avio_printf(out, "#EXT-X-PROGRAM-DATE-TIME:%s.%03d%s\n", buf0, milli, buf1);
prog_date_time += en->duration;
}