[MPlayer-cvslog] r31787 - trunk/vobsub.c

reimar subversion at mplayerhq.hu
Sat Jul 24 19:18:47 CEST 2010


Author: reimar
Date: Sat Jul 24 19:18:46 2010
New Revision: 31787

Log:
Only try to merge packets if we have a previous packet stored.
Based on patch by 191919 [191919 gmail com].

Modified:
   trunk/vobsub.c

Modified: trunk/vobsub.c
==============================================================================
--- trunk/vobsub.c	Sat Jul 24 18:44:23 2010	(r31786)
+++ trunk/vobsub.c	Sat Jul 24 19:18:46 2010	(r31787)
@@ -1033,11 +1033,11 @@ void *vobsub_open(const char *const name
                                             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;


More information about the MPlayer-cvslog mailing list