[libdvdcss-devel] Initialize i_pos from the global dvdcss struct in dvdcss_open().
[email protected] (Diego Biurrun) Fri, 14 Nov 2014 16:45:57 +0100 (CET)
| Newsgroups | gmane.comp.video.videolan.libdvdcss,gmane.comp.video.videolan.libdvdcss.devel |
|---|---|
| Message-ID | <[email protected]> |
libdvdcss | branch: master | Diego Biurrun <[email protected]> | Wed Nov 12 23:55:11 2014 +0100| [0210469b0eb21bf8dc1f71ba0106c1b55f0fcaa8] | 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=0210469b0eb21bf8dc1f71ba0106c1b55f0fcaa8 --- 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 d62561c..13826f8 100644 --- a/src/device.c +++ b/src/device.c @@ -455,8 +455,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"; _______________________________________________ libdvdcss-devel mailing list [email protected] https://mailman.videolan.org/listinfo/libdvdcss-devel