mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2024-12-23 19:31:39 +00:00
possible fix for ucla timing issue
This commit is contained in:
parent
53be44dfdb
commit
e8f8d04369
@ -140,13 +140,13 @@ void write_cc_line_as_transcript2(struct eia608_screen *data, struct encoder_ctx
|
||||
if (ccx_options.transcript_settings.showStartTime){
|
||||
char buf1[80];
|
||||
if (ccx_options.transcript_settings.relativeTimestamp){
|
||||
millis_to_date(start_time + context->subs_delay, buf1);
|
||||
millis_to_date(start_time, buf1);
|
||||
fdprintf(context->out->fh, "%s|", buf1);
|
||||
}
|
||||
else {
|
||||
mstotime(start_time + context->subs_delay, &h1, &m1, &s1, &ms1);
|
||||
time_t start_time_int = (start_time + context->subs_delay) / 1000;
|
||||
int start_time_dec = (start_time + context->subs_delay) % 1000;
|
||||
time_t start_time_int = start_time / 1000;
|
||||
int start_time_dec = start_time % 1000;
|
||||
struct tm *start_time_struct = gmtime(&start_time_int);
|
||||
strftime(buf1, sizeof(buf1), "%Y%m%d%H%M%S", start_time_struct);
|
||||
fdprintf(context->out->fh, "%s%c%03d|", buf1,ccx_options.millis_separator,start_time_dec);
|
||||
|
Loading…
Reference in New Issue
Block a user