Fix wrong format string (#1177)

This commit is contained in:
Nils ANDRÉ-CHANG 2020-01-13 15:54:15 +00:00 committed by Carlos Fernandez Sanz
parent 79f18b996b
commit dad108b7e1

View File

@ -215,18 +215,13 @@ int write_webvtt_header(struct encoder_ctx *context)
unsigned h1, m1, s1, ms1;
millis_to_time(context->timing->sync_pts2fts_fts, &h1, &m1, &s1, &ms1);
// If the user has not disabled X-TIMESTAMP-MAP
// If the user has not disabled X-TIMESTAMP-MAP
if (!context->no_timestamp_map)
{
sprintf(header_string, "X-TIMESTAMP-MAP=MPEGTS:%ld,LOCAL:%02u:%02u:%02u.%03u%s",
context->timing->sync_pts2fts_pts, h1, m1, s1, ms1,
ccx_options.enc_cfg.line_terminator_lf ? "\n\n" : "\r\n\r\n");
}
else {
sprintf(header_string,
context->timing->sync_pts2fts_pts, h1, m1, s1, ms1,
ccx_options.enc_cfg.line_terminator_lf ? "\n\n" : "\r\n\r\n");
}
used = encode_line(context, context->buffer, (unsigned char *)header_string);
write(context->out->fh, context->buffer, used);