Mercurial > mplayer.hg
changeset 10557:2bb2903dfb7e
Prevent missing subtitles at pts reset.
author | ranma |
---|---|
date | Sun, 10 Aug 2003 17:58:22 +0000 |
parents | ad5a27d63a60 |
children | 9d2854bdd8e3 |
files | mplayer.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mplayer.c Sun Aug 10 15:54:25 2003 +0000 +++ b/mplayer.c Sun Aug 10 17:58:22 2003 +0000 @@ -3460,7 +3460,9 @@ // DVD sub len = ds_get_packet_sub(d_dvdsub,(unsigned char**)&packet); if(len > 0) { - timestamp = 90000*(sh_video->timer + d_dvdsub->pts + sub_delay - sh_video->pts); + if (fabs(d_dvdsub->pts - sh_video->pts) < 10) // prevent missing subs on pts reset + timestamp = 90000*(sh_video->timer + d_dvdsub->pts + sub_delay - sh_video->pts); + else timestamp = 90000*(sh_video->timer + sub_delay); mp_dbg(MSGT_CPLAYER,MSGL_V,"\rDVD sub: len=%d v_pts=%5.3f s_pts=%5.3f ts=%d \n",len,sh_video->pts,d_dvdsub->pts,timestamp); } }