Mercurial > mplayer.hg
comparison spudec.c @ 31597:1eb8dc8f96fa
Make subdelay handling work the same way for all subtitle types and also allow
changing subtitle delay to work better with vobsubs.
This probably breaks vobsub behaviour with timestamp wrapping though.
author | reimar |
---|---|
date | Sat, 10 Jul 2010 12:53:05 +0000 |
parents | 1026cf3f3e7b |
children | cafeb7863de8 |
comparison
equal
deleted
inserted
replaced
31596:b4a96ea85a71 | 31597:1eb8dc8f96fa |
---|---|
622 void spudec_heartbeat(void *this, unsigned int pts100) | 622 void spudec_heartbeat(void *this, unsigned int pts100) |
623 { | 623 { |
624 spudec_handle_t *spu = (spudec_handle_t*) this; | 624 spudec_handle_t *spu = (spudec_handle_t*) this; |
625 spu->now_pts = pts100; | 625 spu->now_pts = pts100; |
626 | 626 |
627 // TODO: detect and handle broken timestamps (e.g. due to wrapping) | |
627 while (spu->queue_head != NULL && pts100 >= spu->queue_head->start_pts) { | 628 while (spu->queue_head != NULL && pts100 >= spu->queue_head->start_pts) { |
628 packet_t *packet = spudec_dequeue_packet(spu); | 629 packet_t *packet = spudec_dequeue_packet(spu); |
629 spu->start_pts = packet->start_pts; | 630 spu->start_pts = packet->start_pts; |
630 spu->end_pts = packet->end_pts; | 631 spu->end_pts = packet->end_pts; |
631 if (spu->auto_palette) | 632 if (spu->auto_palette) |