[libdvdcss-devel] Initialize i_pos from the global dvdcss struct in dvdcss_open().
Diego Biurrun
git at videolan.org
Fri Nov 14 11:44:58 CET 2014
libdvdcss | branch: master | Diego Biurrun <diego at biurrun.de> | Wed Nov 12 23:55:11 2014 +0100| [11d087ab94de8514242258dcddfc76848af18a44] | committer: Diego Biurrun
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=11d087ab94de8514242258dcddfc76848af18a44
---
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 0eb2298..1a7d42a 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";
More information about the libdvdcss-devel
mailing list