[MPlayer-dev-eng] [PATCH]seek proble with vob/spu subs

陆 然 hephooey at hotmail.com
Sun May 26 04:53:57 CEST 2002


Hi,

>This patch will break the vobsub on hw render and the dvd subtitles on sw 
render.
>hw renders need timestamp related to sh_video->timer. That's why I put 
this calcul on
>the timestamps and used sh_video->timer for the spu heartbeat.
>But when you just seek sh_video->timer is near 0 so the last sub get a 
negative
>timestamp and spudec throw it. The fix is simply :
>
>diff -Nur -x CVS -x '.*' main/mplayer.c maindev/mplayer.c
>--- main/mplayer.c Sun May 26 07:52:28 2002
>+++ maindev/mplayer.c Sun May 26 08:13:34 2002
>@@ -2940,7 +2933,7 @@
>   // The + next_frame_time is there because we'll display the sub at the 
next frame
>   len = 
vobsub_get_packet(vo_vobsub,d_video->pts+sub_delay+next_frame_time,(void**)&packet,&timestamp);

>   if(len > 0) {
>   timestamp -= (d_video->pts + sub_delay - sh_video->timer)*90000;
>+   if(timestamp < 0) timestamp = 0;
>     mp_dbg(MSGT_CPLAYER,MSGL_V,"\rVOB sub: len=%d v_pts=%5.3f 
v_timer=%5.3f sub=%5.3f ts=%d 
\n",len,d_video->pts,sh_video->timer,timestamp / 90000.0);
>   }
>        }
>
>I'll commit this tomorow unless somebody have an objection to do. Also if 
somebody have
>a vobsub sample _and the movie_ it would be nice as I do have vobsub 
sampled from mphq
>but I don't have the movie so I'm not sure that the timming is perfect.
i'll test it after you commited, thx

---------------------------------
Best Regards,
LR

_________________________________________________________________
免费下载 MSN Explorer:http://explorer.msn.com/lccn/intl.asp




More information about the MPlayer-dev-eng mailing list