diff --git a/src/lib_ccx/ccx_encoders_webvtt.c b/src/lib_ccx/ccx_encoders_webvtt.c index f62c2204..d5460634 100644 --- a/src/lib_ccx/ccx_encoders_webvtt.c +++ b/src/lib_ccx/ccx_encoders_webvtt.c @@ -115,7 +115,7 @@ static const char *webvtt_inline_css = "/* default values */\n" " background-color: rgba(0, 0, 0, 0.5);\n" "}"; -static const char** webvtt_pac_row_percent[] = { "10", "15.33", "20.66", "26", "31.33", "36.66", "42", +static const char* webvtt_pac_row_percent[] = { "10", "15.33", "20.66", "26", "31.33", "36.66", "42", "47.33", "52.66", "58", "63.33", "68.66", "74", "79.33", "84.66" }; /* The timing here is not PTS based, but output based, i.e. user delay must be accounted for @@ -219,7 +219,7 @@ int write_webvtt_header(struct encoder_ctx *context) mprint("Warning: Error creating the file %s\n", css_file_name); return -1; } - fprintf(f, webvtt_inline_css); + fprintf(f, "%s",webvtt_inline_css); fclose(f); char* outline_css_file = (char*)malloc((strlen(css_file_name) + strlen(webvtt_outline_css)) * sizeof(char)); diff --git a/src/lib_ccx/matroska.c b/src/lib_ccx/matroska.c index 328c8841..f1e324aa 100644 --- a/src/lib_ccx/matroska.c +++ b/src/lib_ccx/matroska.c @@ -420,9 +420,9 @@ void parse_segment_cluster_block_group(struct matroska_ctx* mkv_ctx, ULLONG clus sentence_list[i]->time_end = sentence_list[i]->time_start + block_duration; if (ccx_options.gui_mode_reports) { - ULLONG h1, m1, s1, ms1; + unsigned h1, m1, s1, ms1; millis_to_time(sentence_list[i]->time_start, &h1, &m1, &s1, &ms1); - ULLONG h2, m2, s2, ms2; + unsigned h2, m2, s2, ms2; millis_to_time(sentence_list[i]->time_end, &h2, &m2, &s2, &ms2); char *text = sentence_list[i]->text; @@ -996,7 +996,7 @@ void matroska_save_all(struct matroska_ctx* mkv_ctx,char* lang) char* match; for (int i = 0; i < mkv_ctx->sub_tracks_count; i++){ if (lang){ - if (match = strstr(lang,mkv_ctx->sub_tracks[i]->lang) != NULL) + if ((match = strstr(lang,mkv_ctx->sub_tracks[i]->lang)) != NULL) save_sub_track(mkv_ctx, mkv_ctx->sub_tracks[i]); } else diff --git a/src/lib_ccx/utility.h b/src/lib_ccx/utility.h index 78000aa3..656ceaae 100644 --- a/src/lib_ccx/utility.h +++ b/src/lib_ccx/utility.h @@ -36,6 +36,7 @@ char *str_reallocncat(char *dst, char *src); void dump (LLONG mask, unsigned char *start, int l, unsigned long abs_start, unsigned clear_high_bit); LLONG change_timebase(LLONG val, struct ccx_rational cur_tb, struct ccx_rational dest_tb); +void timestamp_to_vtttime(uint64_t timestamp, char *buffer); #ifdef _WIN32 char *strndup(const char *s, size_t n); char *strtok_r(char *str, const char *delim, char **saveptr); diff --git a/src/zlib/gzguts.h b/src/zlib/gzguts.h index 990a4d25..24c6566c 100644 --- a/src/zlib/gzguts.h +++ b/src/zlib/gzguts.h @@ -19,6 +19,7 @@ #endif #include +#include #include "zlib.h" #ifdef STDC # include