If an SSA starts before and ends after the subsequent SSA, the subtitles
were improperly merged resulting in timestamp issues.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6584
b64f7644-9d1e-0410-96f1-
a4d463321fa5
if (ABS(a->s.start - b->s.start) <= 18000)
{
// subtitles start within 1/5 second of eachother, merge
+ if (a->s.stop > b->s.stop)
+ {
+ // a continues after b, reorder the list and swap
+ hb_buffer_t *tmp = a;
+ a->next = b->next;
+ b->next = a;
+ a = b;
+ b = tmp;
+ sanitizer->list_current = a;
+ }
+
sanitizer->list_current = a->next;
if (sanitizer->list_current == NULL)
sanitizer->last = NULL;