From e32a105ab5f14ae94ea6351202af42b72cb5e8d4 Mon Sep 17 00:00:00 2001 From: mswitch Date: Sat, 6 Apr 2002 07:30:28 +0000 Subject: [PATCH] Fixed bug that would cause the dxr3 to lock if too many subpics were sent at once git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5500 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_dxr3.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libvo/vo_dxr3.c b/libvo/vo_dxr3.c index c383fcc811..ccd847eb69 100644 --- a/libvo/vo_dxr3.c +++ b/libvo/vo_dxr3.c @@ -157,6 +157,7 @@ static int fd_control = -1; 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 @@ uint32_t control(uint32_t request, void *data, ...) 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 @@ static void draw_osd(void) 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 @@ static uint32_t preinit(const char *arg) return -1; } } + strcpy(fds_name, devname); #if defined(USE_LIBAVCODEC) if (mpeg_codec == MPG_CODEC_AVCODEC && !avcodec_inited) {