[Mplayer-cvslog] CVS: main spudec.c,1.22,1.23 mplayer.c,1.457,1.458

Arpi of Ize arpi at mplayer.dev.hu
Thu Apr 4 16:24:14 CEST 2002


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv21395

Modified Files:
	spudec.c mplayer.c 
Log Message:
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 at outflux.net>


Index: spudec.c
===================================================================
RCS file: /cvsroot/mplayer/main/spudec.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- spudec.c	3 Apr 2002 18:14:21 -0000	1.22
+++ spudec.c	4 Apr 2002 14:24:11 -0000	1.23
@@ -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;

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.457
retrieving revision 1.458
diff -u -r1.457 -r1.458
--- mplayer.c	2 Apr 2002 02:32:54 -0000	1.457
+++ mplayer.c	4 Apr 2002 14:24:11 -0000	1.458
@@ -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)
 




More information about the MPlayer-cvslog mailing list