changeset 5499:58864ce0eef7

Fixed bug that would cause the dxr3 to lock if too many subpics were sent at once
author mswitch
date Sat, 06 Apr 2002 07:30:28 +0000
parents 3a27cdfc6d87
children ffcc77f10c81
files libvo/vo_dxr3.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_dxr3.c	Sat Apr 06 05:25:43 2002 +0000
+++ b/libvo/vo_dxr3.c	Sat Apr 06 07:30:28 2002 +0000
@@ -157,6 +157,7 @@
 static int fd_video = -1;
 static int fd_spu = -1;
 static char fdv_name[80];
+static char fds_name[80];
 
 /* on screen display/subpics */
 static char *osdpicbuf = NULL;
@@ -200,7 +201,10 @@
 		if (!noprebuf) {
 			close(fd_video);
 			fd_video = open(fdv_name, O_WRONLY);
+			close(fd_spu);
+			fd_spu = open(fds_name, O_WRONLY);
 			fsync(fd_video);
+			fsync(fd_spu);
 		}
 		return VO_TRUE;
 	case VOCTRL_QUERY_FORMAT:
@@ -510,7 +514,7 @@
 		if (!noprebuf) {
 			ioctl(fd_spu, EM8300_IOCTL_SPU_SETPTS, &vo_pts);
 		}
-		/*write(fd_spu, spued->data, spued->count);*/
+		write(fd_spu, spued->data, spued->count);
 	}
 	disposd++;
 }
@@ -742,6 +746,7 @@
 			return -1;
 		}
 	}
+	strcpy(fds_name, devname);
 
 #if defined(USE_LIBAVCODEC)
 	if (mpeg_codec == MPG_CODEC_AVCODEC && !avcodec_inited) {