mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2024-12-24 20:01:42 +00:00
using time from data structure
This commit is contained in:
parent
0f06f47ab4
commit
9c0792c5a0
@ -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,
|
||||
"<SYNC start=%llu><P class=\"UNKNOWNCC\">\r\n",
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user