[libdvdcss-devel] [PATCH] Don't close any handle if callback functions are used

Hannes Domani <[email protected]> Thu, 25 Feb 2016 21:03:29 +0100
Newsgroups gmane.comp.video.videolan.libdvdcss,gmane.comp.video.videolan.libdvdcss.devel
Message-ID <[email protected]>
---
 src/device.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/device.c b/src/device.c
index af735e0..baa4bc5 100644
--- a/src/device.c
+++ b/src/device.c
@@ -406,6 +406,11 @@ int dvdcss_open_device ( dvdcss_t dvdcss )
 
 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 );
-- 
2.7.0

_______________________________________________
libdvdcss-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/libdvdcss-devel