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
This commit is contained in:
mswitch 2002-04-06 07:30:28 +00:00
parent b12227f3ef
commit e32a105ab5
1 changed files with 6 additions and 1 deletions

View File

@ -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) {