[libdvdcss-devel] Tag 1.4.0 : libdvcss 1.4.0 [with patch in-line]
Jörg-Volker Peetz
jvpeetz at web.de
Tue Dec 29 18:01:51 CET 2015
Setting the environment variable DVDCSS_CACHE described in libdvdcss.c does not
work as expected: any path set in the environment variable is ignored and no
caching files are written.
In the function set_cache_directory() the local variable psz_cache containing
any non-void content of DVDCSS_CACHE is not written to the structure dvdcss.
Something like the patch below might be needed, therefore.
Regards,
Jörg-Volker.
diff --git a/src/libdvdcss.c b/src/libdvdcss.c
index 2f78b78..2219096 100644
--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -274,6 +274,13 @@ static int set_cache_directory( dvdcss_t dvdcss )
}
#endif /* ! defined( _WIN32 ) */
}
+ else {
+ int l = 0;
+ while ( *(psz_cache+l) )
+ l++;
+ if (l < PATH_MAX)
+ memcpy( dvdcss->psz_cachefile, psz_cache, l+1 );
+ }
/* Check that there is enough space for the cache directory path and the
* block filename. The +1s are path separators. */
More information about the libdvdcss-devel
mailing list