diff libvo/vo_dxr3.c @ 4724:798fdbcef121

Fixed a strange bug that sneaked in at the last minute (vobsub would segfault for some reason.. I don't even know what vobsub is)
author mswitch
date Sat, 16 Feb 2002 13:06:45 +0000
parents 93e959f0a6e4
children cbef9b843e6d
line wrap: on
line diff
--- a/libvo/vo_dxr3.c	Sat Feb 16 12:51:33 2002 +0000
+++ b/libvo/vo_dxr3.c	Sat Feb 16 13:06:45 2002 +0000
@@ -429,17 +429,15 @@
 	int fdflags = O_WRONLY;
 	
 	/* Open the control interface */
-	if (!strcmp("noprebuf", vo_subdevice)) {
+	if (arg && !strcmp("noprebuf", arg)) {
 		printf("VO: [dxr3] Disabling prebuffering.\n");
 		noprebuf = 1;
 		fdflags |= O_NONBLOCK;
-		free(vo_subdevice);
-		vo_subdevice = NULL;
 	}
 	
-	if (vo_subdevice) {
-		printf("VO: [dxr3] Forcing use of device %s\n", vo_subdevice);
-		sprintf(devname, "/dev/em8300-%s", vo_subdevice);
+	if (arg && !noprebuf) {
+		printf("VO: [dxr3] Forcing use of device %s\n", arg);
+		sprintf(devname, "/dev/em8300-%s", arg);
 	} else {
 		/* Try new naming scheme by default */
 		sprintf(devname, "/dev/em8300-0");
@@ -457,8 +455,8 @@
 	}
 
 	/* Open the video interface */
-	if (vo_subdevice) {
-		sprintf(devname, "/dev/em8300_mv-%s", vo_subdevice);
+	if (arg && !noprebuf) {
+		sprintf(devname, "/dev/em8300_mv-%s", arg);
 	} else {
 		/* Try new naming scheme by default */
 		sprintf(devname, "/dev/em8300_mv-0");
@@ -480,8 +478,8 @@
 	strcpy(fdv_name, devname);
 	
 	/* Open the subpicture interface */
-	if (vo_subdevice) {
-		sprintf(devname, "/dev/em8300_sp-%s", vo_subdevice);
+	if (arg && !noprebuf) {
+		sprintf(devname, "/dev/em8300_sp-%s", arg);
 	} else {
 		/* Try new naming scheme by default */
 		sprintf(devname, "/dev/em8300_sp-0");