changeset 4609:272b0a173417

Fixed a bug where seeking would lock mplayer
author mswitch
date Sat, 09 Feb 2002 14:44:09 +0000
parents b9c19fe73850
children eb8ffbcd0b73
files libvo/vo_dxr3.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_dxr3.c	Sat Feb 09 14:34:08 2002 +0000
+++ b/libvo/vo_dxr3.c	Sat Feb 09 14:44:09 2002 +0000
@@ -105,6 +105,7 @@
 		if (!noprebuf) {
 			close(fd_video);
 			fd_video = open(fdv_name, O_WRONLY);
+			fsync(fd_video);
 		}
 		return VO_TRUE;
 	case VOCTRL_QUERY_FORMAT:
@@ -165,6 +166,10 @@
 	ioctl(fd_control, EM8300_IOCTL_WRITEREG, &reg);
 	
 	/* Clean buffer by syncing it */
+	ioval = EM8300_SUBDEVICE_VIDEO;
+	ioctl(fd_control, EM8300_IOCTL_FLUSH, &ioval);
+	ioval = EM8300_SUBDEVICE_AUDIO;
+	ioctl(fd_control, EM8300_IOCTL_FLUSH, &ioval);
 	fsync(fd_video);
 	ioval = 0x900;
 	ioctl(fd_control, EM8300_IOCTL_SCR_SETSPEED, &ioval);