shithub: libdvdcss

Download patch

ref: 5bec036cfee3950d002f3c46c17bbd4e375d5bd6
parent: 5fd2b38c343a94407863d9fa0820aa251c3d354c
author: Hannes Domani <ssbssa@yahoo.de>
date: Thu Feb 25 16:03:29 EST 2016

Don't close any handle if callback functions are used

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

--- a/src/device.c
+++ b/src/device.c
@@ -406,6 +406,11 @@
 
 int dvdcss_close_device ( dvdcss_t dvdcss )
 {
+    if( dvdcss->p_stream )
+    {
+        return 0;
+    }
+
 #if defined( _WIN32 )
     /* Free readv temporary buffer */
     free( dvdcss->p_readv_buffer );