comparison vobsub.c @ 31721:f9eee489ab45

Only try to merge packets if we have a previous packet stored. Based on patch by 191919 [191919 gmail com].
author reimar
date Sat, 24 Jul 2010 17:18:46 +0000
parents 13ca93203358
children b2fb8e656eca
comparison
equal deleted inserted replaced
31720:5dcb160d8ca9 31721:f9eee489ab45
1031 if (pkt->pts100 != UINT_MAX) { 1031 if (pkt->pts100 != UINT_MAX) {
1032 if (queue->packets_size > 1) 1032 if (queue->packets_size > 1)
1033 last_pts_diff = pkt->pts100 - mpg->pts; 1033 last_pts_diff = pkt->pts100 - mpg->pts;
1034 else 1034 else
1035 pkt->pts100 = mpg->pts; 1035 pkt->pts100 = mpg->pts;
1036 if (mpg->merge) { 1036 if (mpg->merge && queue->current_index > 0) {
1037 packet_t *last = &queue->packets[queue->current_index - 1]; 1037 packet_t *last = &queue->packets[queue->current_index - 1];
1038 pkt->pts100 = last->pts100; 1038 pkt->pts100 = last->pts100;
1039 mpg->merge = 0;
1040 } 1039 }
1040 mpg->merge = 0;
1041 /* FIXME: should not use mpg_sub internal informations, make a copy */ 1041 /* FIXME: should not use mpg_sub internal informations, make a copy */
1042 pkt->data = mpg->packet; 1042 pkt->data = mpg->packet;
1043 pkt->size = mpg->packet_size; 1043 pkt->size = mpg->packet_size;
1044 mpg->packet = NULL; 1044 mpg->packet = NULL;
1045 mpg->packet_reserve = 0; 1045 mpg->packet_reserve = 0;