Re: [libdvdcss-devel] Tag 1.4.0 : libdvcss 1.4.0

Jörg-Volker Peetz <[email protected]> Tue, 29 Dec 2015 17:53:43 +0100
Newsgroups gmane.comp.video.videolan.libdvdcss,gmane.comp.video.videolan.libdvdcss.devel
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------030101010500000900090204
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Setting the environment variable DVDCSS_CACHE described in libdvdcss.c do=
es 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 contai=
ning
any non-void content of DVDCSS_CACHE is not written to the structure dvdc=
ss.
Something like the attached patch might be needed, therefore.

Regards,
J=C3=B6rg-Volker.


--------------030101010500000900090204
Content-Type: text/x-diff;
 name="libdvdcss-DVDCSS_CACHE.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="libdvdcss-DVDCSS_CACHE.patch"

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. */

--------------030101010500000900090204
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
libdvdcss-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/libdvdcss-devel

--------------030101010500000900090204--