aboutsummaryrefslogtreecommitdiff
path: root/libraries/libdvdcss/patches
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2016-10-28 14:06:30 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-10-29 06:58:07 +0700
commita8a8b8e198d9f8fd94c7483af1b6a96b351dccf4 (patch)
tree5f3409a5b907911797c57315072a69f7ed9753ef /libraries/libdvdcss/patches
parent3fb19477bc39a259f6236b8defae9515fc98a578 (diff)
libraries/libdvdcss: Included some patches from upstream git repo
Maybe these fix the bug reported here: https://mailman.videolan.org/pipermail/libdvdcss-devel/2016-April/001641.html Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'libraries/libdvdcss/patches')
-rw-r--r--libraries/libdvdcss/patches/0001-Fix-using-DVDCSS_CACHE-environment-variable.patch28
-rw-r--r--libraries/libdvdcss/patches/0002-Improve-error-reporting-when-cache-directory-creatio.patch26
-rw-r--r--libraries/libdvdcss/patches/0003-Check-for-empty-strings.patch34
-rw-r--r--libraries/libdvdcss/patches/0004-Fix-check-for-empty-home-dir.patch25
-rw-r--r--libraries/libdvdcss/patches/0005-Don-t-close-any-handle-if-callback-functions-are-use.patch29
5 files changed, 142 insertions, 0 deletions
diff --git a/libraries/libdvdcss/patches/0001-Fix-using-DVDCSS_CACHE-environment-variable.patch b/libraries/libdvdcss/patches/0001-Fix-using-DVDCSS_CACHE-environment-variable.patch
new file mode 100644
index 0000000000000..3e9f13e65ed97
--- /dev/null
+++ b/libraries/libdvdcss/patches/0001-Fix-using-DVDCSS_CACHE-environment-variable.patch
@@ -0,0 +1,28 @@
+From 98c66a5b51db1e7a3a056deaafcb9a76d09afbeb Mon Sep 17 00:00:00 2001
+From: Petri Hintukainen <phintuka@gmail.com>
+Date: Fri, 11 Mar 2016 12:00:05 +0200
+Subject: [PATCH 1/5] Fix using DVDCSS_CACHE environment variable
+
+---
+ src/libdvdcss.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/libdvdcss.c b/src/libdvdcss.c
+index 2f78b78..7d86a08 100644
+--- a/src/libdvdcss.c
++++ b/src/libdvdcss.c
+@@ -274,6 +274,11 @@ static int set_cache_directory( dvdcss_t dvdcss )
+ }
+ #endif /* ! defined( _WIN32 ) */
+ }
++ else
++ {
++ strncpy( dvdcss->psz_cachefile, psz_cache, PATH_MAX );
++ dvdcss->psz_cachefile[PATH_MAX - 1] = '\0';
++ }
+
+ /* Check that there is enough space for the cache directory path and the
+ * block filename. The +1s are path separators. */
+--
+2.10.0
+
diff --git a/libraries/libdvdcss/patches/0002-Improve-error-reporting-when-cache-directory-creatio.patch b/libraries/libdvdcss/patches/0002-Improve-error-reporting-when-cache-directory-creatio.patch
new file mode 100644
index 0000000000000..3621d7dfec95a
--- /dev/null
+++ b/libraries/libdvdcss/patches/0002-Improve-error-reporting-when-cache-directory-creatio.patch
@@ -0,0 +1,26 @@
+From 22cb2d442fecf4dd8122347309dbf27ad79e5559 Mon Sep 17 00:00:00 2001
+From: Petri Hintukainen <phintuka@gmail.com>
+Date: Fri, 11 Mar 2016 12:04:34 +0200
+Subject: [PATCH 2/5] Improve error reporting when cache directory creation
+ fails
+
+---
+ src/libdvdcss.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libdvdcss.c b/src/libdvdcss.c
+index 7d86a08..408ec2f 100644
+--- a/src/libdvdcss.c
++++ b/src/libdvdcss.c
+@@ -305,7 +305,7 @@ static int init_cache_dir( dvdcss_t dvdcss )
+ i_ret = mkdir( dvdcss->psz_cachefile, 0755 );
+ if( i_ret < 0 && errno != EEXIST )
+ {
+- print_error( dvdcss, "failed creating cache directory" );
++ print_error( dvdcss, "failed creating cache directory '%s'", dvdcss->psz_cachefile );
+ dvdcss->psz_cachefile[0] = '\0';
+ return -1;
+ }
+--
+2.10.0
+
diff --git a/libraries/libdvdcss/patches/0003-Check-for-empty-strings.patch b/libraries/libdvdcss/patches/0003-Check-for-empty-strings.patch
new file mode 100644
index 0000000000000..2f21bf370e481
--- /dev/null
+++ b/libraries/libdvdcss/patches/0003-Check-for-empty-strings.patch
@@ -0,0 +1,34 @@
+From 100ac1a3762915042ee65b1bf370399966f61be5 Mon Sep 17 00:00:00 2001
+From: Petri Hintukainen <phintuka@gmail.com>
+Date: Fri, 11 Mar 2016 12:07:03 +0200
+Subject: [PATCH 3/5] Check for empty strings
+
+---
+ src/libdvdcss.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/libdvdcss.c b/src/libdvdcss.c
+index 408ec2f..ac90030 100644
+--- a/src/libdvdcss.c
++++ b/src/libdvdcss.c
+@@ -234,7 +234,7 @@ static int set_cache_directory( dvdcss_t dvdcss )
+
+ /* Try looking in password file for home dir. */
+ p_pwd = getpwuid(getuid());
+- if( p_pwd )
++ if( p_pwd && p_pwd[ 0 ] )
+ {
+ psz_home = p_pwd->pw_dir;
+ }
+@@ -248,7 +248,7 @@ static int set_cache_directory( dvdcss_t dvdcss )
+ }
+
+ /* Cache our keys in ${HOME}/.dvdcss/ */
+- if( psz_home )
++ if( psz_home && psz_home[ 0 ] )
+ {
+ int home_pos = 0;
+
+--
+2.10.0
+
diff --git a/libraries/libdvdcss/patches/0004-Fix-check-for-empty-home-dir.patch b/libraries/libdvdcss/patches/0004-Fix-check-for-empty-home-dir.patch
new file mode 100644
index 0000000000000..ccb112fc60fb2
--- /dev/null
+++ b/libraries/libdvdcss/patches/0004-Fix-check-for-empty-home-dir.patch
@@ -0,0 +1,25 @@
+From 5fd2b38c343a94407863d9fa0820aa251c3d354c Mon Sep 17 00:00:00 2001
+From: Petri Hintukainen <phintuka@gmail.com>
+Date: Sun, 13 Mar 2016 12:27:02 +0200
+Subject: [PATCH 4/5] Fix check for empty home dir
+
+---
+ src/libdvdcss.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libdvdcss.c b/src/libdvdcss.c
+index ac90030..6e5d6e1 100644
+--- a/src/libdvdcss.c
++++ b/src/libdvdcss.c
+@@ -234,7 +234,7 @@ static int set_cache_directory( dvdcss_t dvdcss )
+
+ /* Try looking in password file for home dir. */
+ p_pwd = getpwuid(getuid());
+- if( p_pwd && p_pwd[ 0 ] )
++ if( p_pwd && p_pwd->pw_dir && p_pwd->pw_dir[ 0 ] )
+ {
+ psz_home = p_pwd->pw_dir;
+ }
+--
+2.10.0
+
diff --git a/libraries/libdvdcss/patches/0005-Don-t-close-any-handle-if-callback-functions-are-use.patch b/libraries/libdvdcss/patches/0005-Don-t-close-any-handle-if-callback-functions-are-use.patch
new file mode 100644
index 0000000000000..ab67c0e0babc9
--- /dev/null
+++ b/libraries/libdvdcss/patches/0005-Don-t-close-any-handle-if-callback-functions-are-use.patch
@@ -0,0 +1,29 @@
+From 5bec036cfee3950d002f3c46c17bbd4e375d5bd6 Mon Sep 17 00:00:00 2001
+From: Hannes Domani <ssbssa@yahoo.de>
+Date: Thu, 25 Feb 2016 21:03:29 +0100
+Subject: [PATCH 5/5] Don't close any handle if callback functions are used
+
+Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
+---
+ src/device.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/device.c b/src/device.c
+index af735e0..baa4bc5 100644
+--- a/src/device.c
++++ b/src/device.c
+@@ -406,6 +406,11 @@ int dvdcss_open_device ( dvdcss_t dvdcss )
+
+ int dvdcss_close_device ( dvdcss_t dvdcss )
+ {
++ if( dvdcss->p_stream )
++ {
++ return 0;
++ }
++
+ #if defined( _WIN32 )
+ /* Free readv temporary buffer */
+ free( dvdcss->p_readv_buffer );
+--
+2.10.0
+