shithub: libdvdcss

Download patch

ref: 0210469b0eb21bf8dc1f71ba0106c1b55f0fcaa8
parent: 76a8dee9721ac948f4e008f80ffe09c43b899586
author: Diego Biurrun <diego@biurrun.de>
date: Wed Nov 12 18:55:11 EST 2014

Initialize i_pos from the global dvdcss struct in dvdcss_open().

This is a more suitable place than libc_open().

--- a/src/device.c
+++ b/src/device.c
@@ -455,8 +455,6 @@
         return -1;
     }
 
-    dvdcss->i_pos = 0;
-
     return 0;
 }
 
--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -473,6 +473,7 @@
     }
 
     /* Initialize structure with default values. */
+    dvdcss->i_pos = 0;
     dvdcss->p_titles = NULL;
     dvdcss->psz_device = strdup( psz_target );
     dvdcss->psz_error = "no error";