[Mplayer-cvslog] CVS: main mplayer.c,1.350,1.351 spudec.c,1.11,1.12 spudec.h,1.6,1.7
Arpi of Ize
arpi at mplayer.dev.hu
Tue Dec 25 21:32:04 CET 2001
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv1570
Modified Files:
mplayer.c spudec.c spudec.h
Log Message:
dvd seeking -> subtitle disappearing bugs fixed
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.350
retrieving revision 1.351
diff -u -r1.350 -r1.351
--- mplayer.c 25 Dec 2001 17:53:31 -0000 1.350
+++ mplayer.c 25 Dec 2001 20:32:01 -0000 1.351
@@ -2115,6 +2115,10 @@
drop_frame_cnt=0;
too_slow_frame_cnt=0;
too_fast_frame_cnt=0;
+
+#ifdef USE_DVDREAD
+ if(vo_spudec) spudec_reset(vo_spudec);
+#endif
}
rel_seek_secs=0;
abs_seek_pos=0;
Index: spudec.c
===================================================================
RCS file: /cvsroot/mplayer/main/spudec.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- spudec.c 25 Dec 2001 11:14:25 -0000 1.11
+++ spudec.c 25 Dec 2001 20:32:02 -0000 1.12
@@ -284,9 +284,10 @@
}
} else {
// Continue current fragment
- if (spu->packet_size < spu->packet_offset + len)
+ if (spu->packet_size < spu->packet_offset + len){
fprintf(stderr,"invalid fragment\n");
- else {
+ spu->packet_size = spu->packet_offset = 0;
+ } else {
memcpy(spu->packet + spu->packet_offset, packet, len);
spu->packet_offset += len;
}
@@ -295,6 +296,13 @@
spudec_decode(spu);
spu->packet_offset = 0;
}
+}
+
+void spudec_reset(void *this) // called after seek
+{
+ spudec_handle_t *spu = (spudec_handle_t*)this;
+ spu->now_pts = -1;
+ spu->packet_size = spu->packet_offset = 0;
}
void spudec_heartbeat(void *this, int pts100)
Index: spudec.h
===================================================================
RCS file: /cvsroot/mplayer/main/spudec.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- spudec.h 28 Nov 2001 14:55:56 -0000 1.6
+++ spudec.h 25 Dec 2001 20:32:02 -0000 1.7
@@ -9,6 +9,7 @@
void spudec_draw(void *this, void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride));
void *spudec_new(dvd_priv_t *dvd_info);
void spudec_free(void *this);
+void spudec_reset(void *this); // called after seek
#endif
#endif
More information about the MPlayer-cvslog
mailing list