[libdvdcss-devel] Always initialize readv temporary buffer.
Hannes Domani
git at videolan.org
Tue Oct 27 18:30:00 CET 2015
libdvdcss | branch: master | Hannes Domani <ssbssa at yahoo.de> | Fri Jul 24 17:15:39 2015 +0200| [3a322908f40dd16df76e2bfb9516eb052dc7933c] | committer: Jean-Baptiste Kempf
Always initialize readv temporary buffer.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> 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" );
More information about the libdvdcss-devel
mailing list