|
|
if( !newsti ) | if( !newsti ) |
{ | { |
fprintf(stderr, "INFO: Found EOF in .sub file.\n"); | fprintf(stderr, "INFO: Found EOF in .sub file.\n"); |
|
fprintf(stderr, "spts: %d sd: %d\n",\ |
|
cursti->spts / 90000, cursti->sd / 90000); |
} | } |
|
else /* not last sub */ |
if(newsti) /* not last sub */ |
|
{ | { |
if(cursti->spts + cursti->sd + tbs > newsti->spts) | if(cursti->spts + cursti->sd + tbs > newsti->spts) |
{ | { |
if (debug > 4) |
|
fprintf(stderr, "WARN: Overlapping sub\n"); |
|
cursti->sd = -1; | cursti->sd = -1; |
|
if (debug > 4) |
|
{ |
|
fprintf(stderr, "WARN: Overlapping sub\n"); |
|
fprintf(stderr, "spts: %d sd: %d nspts: %d\n",\ |
|
cursti->spts / 90000, cursti->sd / 90000, newsti->spts / 90000); |
|
} |
} | } |
} /* end if ! last sub */ | } /* end if ! last sub */ |
| |
if(debug > 4) |
|
{ |
|
fprintf(stderr, "spts: %d sd: %d nspts: %d\n",\ |
|
cursti->spts / 90000, cursti->sd / 90000, newsti->spts / 90000); |
|
} |
|
|
|
if( (cursti->sd == -1) && newsti && ( (!svcd) || until_next_sub) ) | if( (cursti->sd == -1) && newsti && ( (!svcd) || until_next_sub) ) |
{ | { |
if(newsti->spts > cursti->spts + tbs) cursti->sd = newsti->spts - cursti->spts - tbs; | if(newsti->spts > cursti->spts + tbs) cursti->sd = newsti->spts - cursti->spts - tbs; |