Lines 393-416
Link Here
|
393 |
if( !newsti ) |
393 |
if( !newsti ) |
394 |
{ |
394 |
{ |
395 |
fprintf(stderr, "INFO: Found EOF in .sub file.\n"); |
395 |
fprintf(stderr, "INFO: Found EOF in .sub file.\n"); |
|
|
396 |
fprintf(stderr, "spts: %d sd: %d\n",\ |
397 |
cursti->spts / 90000, cursti->sd / 90000); |
396 |
} |
398 |
} |
397 |
|
399 |
else /* not last sub */ |
398 |
if(newsti) /* not last sub */ |
|
|
399 |
{ |
400 |
{ |
400 |
if(cursti->spts + cursti->sd + tbs > newsti->spts) |
401 |
if(cursti->spts + cursti->sd + tbs > newsti->spts) |
401 |
{ |
402 |
{ |
402 |
if (debug > 4) |
|
|
403 |
fprintf(stderr, "WARN: Overlapping sub\n"); |
404 |
cursti->sd = -1; |
403 |
cursti->sd = -1; |
|
|
404 |
if (debug > 4) |
405 |
{ |
406 |
fprintf(stderr, "WARN: Overlapping sub\n"); |
407 |
fprintf(stderr, "spts: %d sd: %d nspts: %d\n",\ |
408 |
cursti->spts / 90000, cursti->sd / 90000, newsti->spts / 90000); |
409 |
} |
405 |
} |
410 |
} |
406 |
} /* end if ! last sub */ |
411 |
} /* end if ! last sub */ |
407 |
|
412 |
|
408 |
if(debug > 4) |
|
|
409 |
{ |
410 |
fprintf(stderr, "spts: %d sd: %d nspts: %d\n",\ |
411 |
cursti->spts / 90000, cursti->sd / 90000, newsti->spts / 90000); |
412 |
} |
413 |
|
414 |
if( (cursti->sd == -1) && newsti && ( (!svcd) || until_next_sub) ) |
413 |
if( (cursti->sd == -1) && newsti && ( (!svcd) || until_next_sub) ) |
415 |
{ |
414 |
{ |
416 |
if(newsti->spts > cursti->spts + tbs) cursti->sd = newsti->spts - cursti->spts - tbs; |
415 |
if(newsti->spts > cursti->spts + tbs) cursti->sd = newsti->spts - cursti->spts - tbs; |