[libdvdcss-devel] Always initialize readv temporary buffer.
[email protected] (Hannes Domani) Tue, 27 Oct 2015 18:30:00 +0100 (CET)
| Newsgroups | gmane.comp.video.videolan.libdvdcss,gmane.comp.video.videolan.libdvdcss.devel |
|---|---|
| Message-ID | <[email protected]> |
libdvdcss | branch: master | Hannes Domani <[email protected]> | Fri Jul 24 17:15:39 2015 +0200| [3a322908f40dd16df76e2bfb9516eb052dc7933c] | committer: Jean-Baptiste Kempf Always initialize readv temporary buffer. Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=3a322908f40dd16df76e2bfb9516eb052dc7933c --- src/device.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/device.c b/src/device.c index 98ecbe3..af735e0 100644 --- a/src/device.c +++ b/src/device.c @@ -350,6 +350,12 @@ int dvdcss_open_device ( dvdcss_t dvdcss ) } print_debug( dvdcss, "opening target `%s'", psz_device ); +#if defined( _WIN32 ) + /* Initialize readv temporary buffer */ + dvdcss->p_readv_buffer = NULL; + dvdcss->i_readv_buf_size = 0; +#endif + /* if callback functions are initialized */ if( dvdcss->p_stream ) { @@ -367,10 +373,6 @@ int dvdcss_open_device ( dvdcss_t dvdcss ) (!psz_device[2] || (psz_device[2] == '\\' && !psz_device[3]))) dvdcss->b_file = 0; - /* Initialize readv temporary buffer */ - dvdcss->p_readv_buffer = NULL; - dvdcss->i_readv_buf_size = 0; - if( !dvdcss->b_file ) { print_debug( dvdcss, "using Win2K API for access" ); _______________________________________________ libdvdcss-devel mailing list [email protected] https://mailman.videolan.org/listinfo/libdvdcss-devel