[MPlayer-dev-eng] [PATCH] mpdvdkit drive specification
Joey Parrish
joey at nicewarrior.org
Thu Aug 12 02:08:13 CEST 2004
Hello,
Attached is a patch to change device name parsing in mpdvdkit2.
When doing dvd associations in windows explorer, we get a drive letter
in the style of 'X:\' but mpdvdkit looks for X: only.
This patch changes that.
Comments, send upstream, commit?
--Joey
--
"I know Kung Fu." --Darth Vader
-------------- next part --------------
change device name parsing:
explorer gives us X:\ instead of just X:
diff -ur main.sofar/libmpdvdkit2/device.c main.dev/libmpdvdkit2/device.c
--- main.sofar/libmpdvdkit2/device.c 2003-07-20 13:34:18.000000000 -0500
+++ main.dev/libmpdvdkit2/device.c 2003-07-20 13:34:07.000000000 -0500
@@ -134,8 +134,11 @@
_dvdcss_debug( dvdcss, psz_debug );
#if defined( WIN32 )
- /* If device is not "X:", we are actually opening a file. */
- dvdcss->b_file = !psz_device[0] || psz_device[1] != ':' || psz_device[2];
+ dvdcss->b_file = 1;
+ /* If device is "X:" or "X:\", we are not actually opening a file. */
+ if (psz_device[0] && psz_device[1] == ':' &&
+ (!psz_device[2] || (psz_device[2] == '\\' && !psz_device[3])))
+ dvdcss->b_file = 0;
/* Initialize readv temporary buffer */
dvdcss->p_readv_buffer = NULL;
More information about the MPlayer-dev-eng
mailing list