[Mplayer-cvslog] CVS: main mencoder.c,1.138,1.139
Kim Minh Kaplan CVS
kmkaplan at mplayerhq.hu
Thu Jul 11 20:48:51 CEST 2002
Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv9905
Modified Files:
mencoder.c
Log Message:
Fix Vobsub output synchro.
Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -r1.138 -r1.139
--- mencoder.c 8 Jul 2002 21:44:51 -0000 1.138
+++ mencoder.c 11 Jul 2002 18:48:43 -0000 1.139
@@ -311,8 +311,6 @@
int file_format=DEMUXER_TYPE_UNKNOWN;
int i;
void *vobsub_writer=NULL;
-double vobsubout_origin_pts=0.0;
-int vobsubout_origin_pts_set=0;
uint32_t ptimer_start;
uint32_t audiorate=0;
@@ -1151,16 +1149,12 @@
if(vo_spudec||vobsub_writer){
unsigned char* packet=NULL;
int len;
- if (vobsub_writer && !vobsubout_origin_pts_set) {
- vobsubout_origin_pts_set = 1;
- vobsubout_origin_pts = d_video->pts;
- }
while((len=ds_get_packet_sub(d_dvdsub,&packet))>0){
mp_msg(MSGT_MENCODER,MSGL_V,"\rDVD sub: len=%d v_pts=%5.3f s_pts=%5.3f \n",len,d_video->pts,d_dvdsub->pts);
if (vo_spudec)
spudec_assemble(vo_spudec,packet,len,90000*d_dvdsub->pts);
if (vobsub_writer)
- vobsub_out_output(vobsub_writer,packet,len,d_dvdsub->pts-vobsubout_origin_pts);
+ vobsub_out_output(vobsub_writer,packet,len,mux_v->timer + d_dvdsub->pts - d_video->pts);
}
if (vo_spudec) {
spudec_heartbeat(vo_spudec,90000*d_video->pts);
More information about the MPlayer-cvslog
mailing list