[PATCH] device name parsing
Joey Parrish
joey at nicewarrior.org
Fri Aug 13 01:02:19 CEST 2004
Hello,
Here's a patch just committed to mpdvdkit2 in MPlayer CVS. This version
has been made against latest libdvdcss from viewcvs.
This patch changes device name parsing to accept both X: and X:\ as raw
device names. I needed this because windows explorer hands the default
DVD Player a drive name in X:\ form.
Hope you find it useful.
Thanks,
--Joey
--
"You think without your internal dialog, and I have red socks." --Prem
-------------- next part --------------
--- device.c.orig 2004-08-12 22:47:04.631348800 +0000
+++ device.c 2004-08-12 22:48:40.829675200 +0000
@@ -143,8 +143,11 @@
print_debug( dvdcss, "opening target `%s'", psz_device );
#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 libdvdcss-devel
mailing list