diff --git a/src/608_sami.c b/src/608_sami.c index 921f793d..d5b40d60 100644 --- a/src/608_sami.c +++ b/src/608_sami.c @@ -75,13 +75,13 @@ int write_cc_buffer_as_sami(struct eia608_screen *data, struct s_context_cc608 * { LLONG startms, endms; int wrote_something=0; - startms = context->current_visible_start_ms; + startms = data->start_time; startms+=subs_delay; if (startms<0) // Drop screens that because of subs_delay start too early return 0; - endms = get_visible_end()+subs_delay; + endms = data->end_time; endms--; // To prevent overlapping with next line. sprintf ((char *) str, "

\r\n", diff --git a/src/608_smptett.c b/src/608_smptett.c index 591bca45..48f514b5 100644 --- a/src/608_smptett.c +++ b/src/608_smptett.c @@ -102,13 +102,13 @@ int write_cc_buffer_as_smptett(struct eia608_screen *data, struct s_context_cc60 unsigned h2,m2,s2,ms2; LLONG endms; int wrote_something=0; - LLONG startms = context->current_visible_start_ms; + LLONG startms = data->start_time; startms+=subs_delay; if (startms<0) // Drop screens that because of subs_delay start too early return 0; - endms = get_visible_end()+subs_delay; + endms = data->end_time; endms--; // To prevent overlapping with next line. mstotime (startms,&h1,&m1,&s1,&ms1); mstotime (endms-1,&h2,&m2,&s2,&ms2); diff --git a/src/608_spupng.c b/src/608_spupng.c index 9b7c802b..100c335b 100644 --- a/src/608_spupng.c +++ b/src/608_spupng.c @@ -196,7 +196,7 @@ int spupng_write_ccbuffer(struct spupng_t *sp, struct eia608_screen* data, struct s_context_cc608 *context) { - LLONG ms_start = context->current_visible_start_ms + subs_delay; + LLONG ms_start = data->start_time + subs_delay; if (ms_start < 0) { dbg_print(CCX_DMT_VERBOSE, "Negative start\n"); @@ -220,7 +220,7 @@ spupng_write_ccbuffer(struct spupng_t *sp, struct eia608_screen* data, return 0; } - LLONG ms_end = get_visible_end() + subs_delay; + LLONG ms_end = data->end_time; sprintf(sp->pngfile, "%s/sub%04d.png", sp->dirname, sp->fileIndex++); if ((sp->fppng = fopen(sp->pngfile, "wb")) == NULL)