From e8f8d0436936f18f7b5055af59152ad0b85d70f3 Mon Sep 17 00:00:00 2001 From: wforums Date: Fri, 10 Oct 2014 16:37:41 +0200 Subject: [PATCH] possible fix for ucla timing issue --- src/lib_ccx/ccx_encoders_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib_ccx/ccx_encoders_common.c b/src/lib_ccx/ccx_encoders_common.c index c806fd49..85d744a8 100644 --- a/src/lib_ccx/ccx_encoders_common.c +++ b/src/lib_ccx/ccx_encoders_common.c @@ -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);