[libdvdcss-devel] [PATCH 3/9] Skip determining cache directory name if DVDCSS_CACHE is set to "off".

Diego Biurrun diego at biurrun.de
Tue Nov 4 15:15:05 CET 2014


---
 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;
         }
-- 
1.9.1



More information about the libdvdcss-devel mailing list