using time from data structure

This commit is contained in:
Anshul Maheshwari 2014-07-11 18:51:04 +05:30
parent 0f06f47ab4
commit 9c0792c5a0
3 changed files with 6 additions and 6 deletions

View File

@ -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",

View File

@ -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);

View File

@ -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)