Diego Biurrun
2014-11-04 15:26:02 UTC
libdvdcss | branch: master | Diego Biurrun <***@biurrun.de> | Mon Nov 3 13:38:24 2014 +0100| [167fb80150aaf1869a3d298da87361ea1014bf00] | committer: Diego Biurrun
Skip determining cache directory name if DVDCSS_CACHE is set to "off".
src/libdvdcss.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/libdvdcss.c b/src/libdvdcss.c
index bfc2d61..2bfd98e 100644
--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -186,6 +186,11 @@ static char *set_cache_directory( dvdcss_t dvdcss )
{
char *psz_cache = getenv( "DVDCSS_CACHE" );
+ if( psz_cache && !strcmp( psz_cache, "off" ) )
+ {
+ return NULL;
+ }
+
if( psz_cache == NULL || psz_cache[0] == '\0' )
{
#if defined(_WIN32_IE) && _WIN32_IE >= 0x500
@@ -249,7 +254,7 @@ static char *set_cache_directory( dvdcss_t dvdcss )
/* Sanity check psz_cache value. */
if( psz_cache != NULL )
{
- if( psz_cache[0] == '\0' || !strcmp( psz_cache, "off" ) )
+ if( psz_cache[0] == '\0' )
{
return NULL;
}
Skip determining cache directory name if DVDCSS_CACHE is set to "off".
http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=167fb80150aaf1869a3d298da87361ea1014bf00
---src/libdvdcss.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/libdvdcss.c b/src/libdvdcss.c
index bfc2d61..2bfd98e 100644
--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -186,6 +186,11 @@ static char *set_cache_directory( dvdcss_t dvdcss )
{
char *psz_cache = getenv( "DVDCSS_CACHE" );
+ if( psz_cache && !strcmp( psz_cache, "off" ) )
+ {
+ return NULL;
+ }
+
if( psz_cache == NULL || psz_cache[0] == '\0' )
{
#if defined(_WIN32_IE) && _WIN32_IE >= 0x500
@@ -249,7 +254,7 @@ static char *set_cache_directory( dvdcss_t dvdcss )
/* Sanity check psz_cache value. */
if( psz_cache != NULL )
{
- if( psz_cache[0] == '\0' || !strcmp( psz_cache, "off" ) )
+ if( psz_cache[0] == '\0' )
{
return NULL;
}