Mercurial > mplayer.hg
changeset 5488:3f183ca22747
fixed SPU pts, it's 1024/90000 based instead of 1/100
spudec code doesn't requires dvdread - removed some #ifdefs
- from dvdnav patch by Kees Cook <mplayer@outflux.net>
author | arpi |
---|---|
date | Thu, 04 Apr 2002 14:24:11 +0000 |
parents | 2bff5d1138fa |
children | 5e6e08ff47d5 |
files | mplayer.c spudec.c |
diffstat | 2 files changed, 6 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/mplayer.c Thu Apr 04 13:52:24 2002 +0000 +++ b/mplayer.c Thu Apr 04 14:24:11 2002 +0000 @@ -51,9 +51,8 @@ #ifdef USE_DVDNAV #include <dvdnav.h> #endif -#ifdef USE_DVDREAD + #include "spudec.h" -#endif #include "vobsub.h" #include "linux/getch2.h" @@ -301,14 +300,13 @@ getch2_disable(); } -#ifdef USE_DVDREAD if (mask&INITED_SPUDEC){ inited_flags&=~INITED_SPUDEC; current_module="uninit_spudec"; spudec_free(vo_spudec); vo_spudec=NULL; } -#endif + if(mask&INITED_VO){ inited_flags&=~INITED_VO; current_module="uninit_vo"; @@ -2575,9 +2573,7 @@ too_slow_frame_cnt=0; too_fast_frame_cnt=0; -#ifdef USE_DVDREAD - if(vo_spudec) spudec_reset(vo_spudec); -#endif + if(vo_spudec) spudec_reset(vo_spudec); } } rel_seek_secs=0; @@ -2683,7 +2679,6 @@ current_module=NULL; } -#ifdef USE_DVDREAD // DVD sub: if(vo_flags & 0x08){ static vo_mpegpes_t packet; @@ -2700,15 +2695,14 @@ current_module="spudec"; while((len=ds_get_packet_sub(d_dvdsub,&packet))>0){ mp_msg(MSGT_CPLAYER,MSGL_V,"\rDVD sub: len=%d v_pts=%5.3f s_pts=%5.3f \n",len,d_video->pts,d_dvdsub->pts); - spudec_assemble(vo_spudec,packet,len,100*d_dvdsub->pts); + spudec_assemble(vo_spudec,packet,len,90000*d_dvdsub->pts); } - spudec_heartbeat(vo_spudec,100*d_video->pts); + spudec_heartbeat(vo_spudec,90000*d_video->pts); /* Don't know how to detect wether the sub has changed or not */ vo_osd_changed(1); current_module=NULL; } -#endif } // while(!eof)
--- a/spudec.c Thu Apr 04 13:52:24 2002 +0000 +++ b/spudec.c Thu Apr 04 14:24:11 2002 +0000 @@ -196,7 +196,7 @@ next_off = this->control_start; while (start_off != next_off) { start_off = next_off; - date = get_be16(this->packet + start_off); + date = get_be16(this->packet + start_off) * 1024; next_off = get_be16(this->packet + start_off + 2); mp_msg(MSGT_SPUDEC,MSGL_DBG2, "date=%d\n", date); off = start_off + 4;