[Mplayer-cvslog] CVS: main dvdauth.c,1.2,1.3

Gabor Lenart lgb at users.sourceforge.net
Sat Apr 21 17:28:21 CEST 2001


Update of /cvsroot/mplayer/main
In directory usw-pr-cvs1:/tmp/cvs-serv30370/main

Modified Files:
	dvdauth.c 
Log Message:
Detect unencrypted DVDs and not try to auth them

Index: dvdauth.c
===================================================================
RCS file: /cvsroot/mplayer/main/dvdauth.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** dvdauth.c	2001/04/20 14:32:09	1.2
--- dvdauth.c	2001/04/21 15:28:19	1.3
***************
*** 1,4 ****
  /* (C)2001 by LGB (Gabor Lenart), based on example programs in libcss
!    Some TODO: root privilegies really needed??  */
  
  /* don't do anything with this source if css support was not requested */
--- 1,4 ----
  /* (C)2001 by LGB (Gabor Lenart), based on example programs in libcss
!            lgb at lgb.hu                                                        */
  
  /* don't do anything with this source if css support was not requested */
***************
*** 87,90 ****
--- 87,91 ----
  
  
+ 
  int dvd_auth ( char *dev , int fd )
  {
***************
*** 92,96 ****
          int lba;
  
- //	printf("DVD: auth fd=%d on %s.\n",fd,dev);
  
  	if ((devfd=open(dev,O_RDONLY))<0) {
--- 93,96 ----
***************
*** 98,101 ****
--- 98,106 ----
  		return 1;
  	}
+ 	
+ 	if (!CSSisEncrypted(devfd)) {
+ 		printf("DVD is unencrypted! Skipping authentication!\n(note: you should not use -dvd switch for unencrypted discs!)\n");
+ 		return 0;
+ 	} else printf("DVD is encrypted, issuing authentication ...\n");
  
  	/* reset AGIDs */


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list