Diego Biurrun
2014-11-13 13:56:18 UTC
libdvdcss | branch: master | Diego Biurrun <***@biurrun.de> | Wed Nov 12 23:55:11 2014 +0100| [efaaa3b7031cd55d767f9e1e9cd31bc49d532af0] | committer: Diego Biurrun
Initialize i_pos from the global dvdcss struct in dvdcss_open().
This is a more suitable place than libc_open().
src/device.c | 2 --
src/libdvdcss.c | 1 +
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/device.c b/src/device.c
index e824b54..07e0a17 100644
--- a/src/device.c
+++ b/src/device.c
@@ -456,8 +456,6 @@ static int libc_open ( dvdcss_t dvdcss, const char *psz_device )
return -1;
}
- dvdcss->i_pos = 0;
-
return 0;
}
diff --git a/src/libdvdcss.c b/src/libdvdcss.c
index 91f83cd..b5911fd 100644
--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -473,6 +473,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( const char *psz_target )
}
/* Initialize structure with default values. */
+ dvdcss->i_pos = 0;
dvdcss->p_titles = NULL;
dvdcss->psz_device = strdup( psz_target );
dvdcss->psz_error = "no error";
Initialize i_pos from the global dvdcss struct in dvdcss_open().
This is a more suitable place than libc_open().
http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=efaaa3b7031cd55d767f9e1e9cd31bc49d532af0
---src/device.c | 2 --
src/libdvdcss.c | 1 +
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/device.c b/src/device.c
index e824b54..07e0a17 100644
--- a/src/device.c
+++ b/src/device.c
@@ -456,8 +456,6 @@ static int libc_open ( dvdcss_t dvdcss, const char *psz_device )
return -1;
}
- dvdcss->i_pos = 0;
-
return 0;
}
diff --git a/src/libdvdcss.c b/src/libdvdcss.c
index 91f83cd..b5911fd 100644
--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -473,6 +473,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( const char *psz_target )
}
/* Initialize structure with default values. */
+ dvdcss->i_pos = 0;
dvdcss->p_titles = NULL;
dvdcss->psz_device = strdup( psz_target );
dvdcss->psz_error = "no error";