From cbe036312a69a3bce4352f50aea09e4ff3f1f8cf Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 24 Jul 2010 17:18:46 +0000 Subject: [PATCH] vobsub: Only try to merge packets if we have an earlier one stored Based on patch by 191919 [191919 gmail com]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31787 b3059339-0415-0410-9bf9-f77b7e298cf2 --- vobsub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vobsub.c b/vobsub.c index f208b7d8de..b1c9a06c67 100644 --- a/vobsub.c +++ b/vobsub.c @@ -1033,11 +1033,11 @@ void *vobsub_open(const char *const name, const char *const ifo, 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; -- 2.11.4.GIT