# HG changeset patch # User reimar # Date 1279991926 0 # Node ID f9eee489ab45ba1bac5eb9e48fafb7aed912e000 # Parent 5dcb160d8ca9d01883680b7d5740d6d16a9663c9 Only try to merge packets if we have a previous packet stored. Based on patch by 191919 [191919 gmail com]. diff -r 5dcb160d8ca9 -r f9eee489ab45 vobsub.c --- a/vobsub.c Sat Jul 24 16:44:23 2010 +0000 +++ b/vobsub.c Sat Jul 24 17:18:46 2010 +0000 @@ -1033,11 +1033,11 @@ last_pts_diff = pkt->pts100 - mpg->pts; else pkt->pts100 = mpg->pts; - if (mpg->merge) { + if (mpg->merge && queue->current_index > 0) { packet_t *last = &queue->packets[queue->current_index - 1]; pkt->pts100 = last->pts100; - mpg->merge = 0; } + mpg->merge = 0; /* FIXME: should not use mpg_sub internal informations, make a copy */ pkt->data = mpg->packet; pkt->size = mpg->packet_size;