From c2a12149e2cffa26dc857bb07da3a7777381c248 Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 21 Aug 2008 13:40:16 +0000 Subject: Sync libdvdcss with upstream version r212. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27474 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Copyright | 2 +- libdvdcss/css.c | 5 +++-- libdvdcss/css.h | 2 +- libdvdcss/csstables.h | 2 +- libdvdcss/device.c | 4 ++-- libdvdcss/device.h | 4 ++-- libdvdcss/dvdcss/dvdcss.h | 4 +++- libdvdcss/ioctl.c | 4 ++-- libdvdcss/libdvdcss.c | 20 ++++++++++++++++++-- libdvdcss/libdvdcss.h | 2 +- 10 files changed, 34 insertions(+), 15 deletions(-) diff --git a/Copyright b/Copyright index a289df85ea..3e7349feba 100644 --- a/Copyright +++ b/Copyright @@ -42,7 +42,7 @@ Copyright: 1999-2000 Aaron Holtzman License: GNU General Public License Name: libdvdcss -Version: Subversion r208 (post 1.2.9 release) +Version: Subversion r212 (post 1.2.9 release) Homepage: http://developers.videolan.org/libdvdcss/ Directory: libdvdcss Copyright: 1998-2006 VideoLAN diff --git a/libdvdcss/css.c b/libdvdcss/css.c index a704a3fcf9..8e0e8eb919 100644 --- a/libdvdcss/css.c +++ b/libdvdcss/css.c @@ -4,8 +4,8 @@ * Copyright (C) 1999-2003 VideoLAN * $Id$ * - * Authors: Stéphane Borel - * Håkan Hjort + * Authors: Stéphane Borel + * HÃ¥kan Hjort * * based on: * - css-auth by Derek Fawcus @@ -325,6 +325,7 @@ int _dvdcss_disckey( dvdcss_t dvdcss ) "cracking title keys instead" ); /* Fallback, but not to DISC as the disc key might be faulty */ + memset( p_disc_key, 0, KEY_SIZE ); dvdcss->i_method = DVDCSS_METHOD_TITLE; break; diff --git a/libdvdcss/css.h b/libdvdcss/css.h index 82f64f8951..03becda17c 100644 --- a/libdvdcss/css.h +++ b/libdvdcss/css.h @@ -4,7 +4,7 @@ * Copyright (C) 1999-2001 VideoLAN * $Id$ * - * Author: Stéphane Borel + * Author: Stéphane Borel * * based on: * - css-auth by Derek Fawcus diff --git a/libdvdcss/csstables.h b/libdvdcss/csstables.h index fb3cdfef47..bd0fc3a706 100644 --- a/libdvdcss/csstables.h +++ b/libdvdcss/csstables.h @@ -4,7 +4,7 @@ * Copyright (C) 1999-2001 VideoLAN * $Id$ * - * Author: Stéphane Borel + * Author: Stéphane Borel * * based on: * - css-auth by Derek Fawcus diff --git a/libdvdcss/device.c b/libdvdcss/device.c index 8185f17d21..0d8e4a06ee 100644 --- a/libdvdcss/device.c +++ b/libdvdcss/device.c @@ -4,9 +4,9 @@ * Copyright (C) 1998-2006 VideoLAN * $Id$ * - * Authors: Stéphane Borel + * Authors: Stéphane Borel * Sam Hocevar - * Håkan Hjort + * HÃ¥kan Hjort * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libdvdcss/device.h b/libdvdcss/device.h index 867703172b..e406539df1 100644 --- a/libdvdcss/device.h +++ b/libdvdcss/device.h @@ -4,9 +4,9 @@ * Copyright (C) 1998-2002 VideoLAN * $Id$ * - * Authors: Stéphane Borel + * Authors: Stéphane Borel * Samuel Hocevar - * Håkan Hjort + * HÃ¥kan Hjort * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libdvdcss/dvdcss/dvdcss.h b/libdvdcss/dvdcss/dvdcss.h index 959e796ceb..77eb42239f 100644 --- a/libdvdcss/dvdcss/dvdcss.h +++ b/libdvdcss/dvdcss/dvdcss.h @@ -1,6 +1,6 @@ /** * \file dvdcss.h - * \author Stéphane Borel + * \author Stéphane Borel * \author Samuel Hocevar * \brief The \e libdvdcss public header. * @@ -88,6 +88,8 @@ LIBDVDCSS_EXPORT int dvdcss_readv ( dvdcss_t, int i_flags ); LIBDVDCSS_EXPORT char * dvdcss_error ( dvdcss_t ); +LIBDVDCSS_EXPORT int dvdcss_is_scrambled ( dvdcss_t ); + /* * Deprecated stuff. diff --git a/libdvdcss/ioctl.c b/libdvdcss/ioctl.c index 119a7afc2a..83553a156b 100644 --- a/libdvdcss/ioctl.c +++ b/libdvdcss/ioctl.c @@ -7,9 +7,9 @@ * Authors: Markus Kuespert * Samuel Hocevar * Jon Lech Johansen - * Håkan Hjort + * HÃ¥kan Hjort * Eugenio Jarosiewicz - * David Siebörger + * David Siebörger * Alex Strelnikov * Gildas Bazin * diff --git a/libdvdcss/libdvdcss.c b/libdvdcss/libdvdcss.c index 9d992d635d..f2b70d3b6d 100644 --- a/libdvdcss/libdvdcss.c +++ b/libdvdcss/libdvdcss.c @@ -1,8 +1,8 @@ /* libdvdcss.c: DVD reading library. * - * Authors: Stéphane Borel + * Authors: Stéphane Borel * Samuel Hocevar - * Håkan Hjort + * HÃ¥kan Hjort * * Copyright (C) 1998-2002 VideoLAN * $Id$ @@ -375,6 +375,10 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target ) "could not get disc key" ); } } + else + { + memset( dvdcss->css.p_disc_key, 0, KEY_SIZE ); + } /* If the cache is enabled, write the cache directory tag */ if( psz_cache ) @@ -793,3 +797,15 @@ LIBDVDCSS_EXPORT int dvdcss_title ( dvdcss_t dvdcss, int i_block ) return _dvdcss_title( dvdcss, i_block ); } +/** + * \brief Return 1 if the DVD is scrambled, 0 otherwise. + * + * \param dvdcss a \e libdvdcss instance. + * \return 1 if the DVD is scrambled, 0 otherwise. + * + * This function returns whether the DVD is scrambled. + */ +LIBDVDCSS_EXPORT int dvdcss_is_scrambled ( dvdcss_t dvdcss ) +{ + return dvdcss->b_scrambled; +} diff --git a/libdvdcss/libdvdcss.h b/libdvdcss/libdvdcss.h index 9fad5d84ce..4d081368e9 100644 --- a/libdvdcss/libdvdcss.h +++ b/libdvdcss/libdvdcss.h @@ -4,7 +4,7 @@ * Copyright (C) 1998-2001 VideoLAN * $Id$ * - * Authors: Stéphane Borel + * Authors: Stéphane Borel * Samuel Hocevar * * This program is free software; you can redistribute it and/or modify -- cgit v1.2.3