[libdvdcss-devel] Skip determining cache directory name if DVDCSS_CACHE is set to "off".
[email protected] (Diego Biurrun) Tue, 4 Nov 2014 16:26:02 +0100 (CET)
| Newsgroups | gmane.comp.video.videolan.libdvdcss,gmane.comp.video.videolan.libdvdcss.devel |
|---|---|
| Message-ID | <[email protected]> |
libdvdcss | branch: master | Diego Biurrun <[email protected]> | Mon Nov 3 13:38:24 2014 +0100| [167fb80150aaf1869a3d298da87361ea1014bf00] | committer: Diego Biurrun 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; } _______________________________________________ libdvdcss-devel mailing list [email protected] https://mailman.videolan.org/listinfo/libdvdcss-devel