Skip to content
Permalink
Browse files

Fix wrong format string (#1177)

  • Loading branch information
NilsIrl authored and cfsmp3 committed Jan 13, 2020
1 parent 79f18b9 commit dad108b7e19de49d970a962a5f7bd53180e64576
Showing with 1 addition and 6 deletions.
  1. +1 −6 src/lib_ccx/ccx_encoders_webvtt.c
@@ -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);

0 comments on commit dad108b

Please sign in to comment.
You can’t perform that action at this time.