shithub: libdvdcss

Download patch

ref: 3a322908f40dd16df76e2bfb9516eb052dc7933c
parent: 41905a9b3581a0efe7ecc73d39f7820601d16ff3
author: Hannes Domani <ssbssa@yahoo.de>
date: Fri Jul 24 13:15:39 EDT 2015

Always initialize readv temporary buffer.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>

--- a/src/device.c
+++ b/src/device.c
@@ -350,6 +350,12 @@
     }
     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 )
     {
@@ -366,10 +372,6 @@
     if (psz_device[0] && psz_device[1] == ':' &&
        (!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 )
     {