[libbluray-devel] split libbdplus_unload()

npzacs git at videolan.org
Wed Feb 24 11:41:45 CET 2016


libbluray | branch: master | npzacs <npzacs at gmail.com> | Mon Feb  8 16:31:17 2016 +0200| [4cd5186667c54e732c7d4d0aac5feb67e7963b83] | committer: npzacs

split libbdplus_unload()

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=4cd5186667c54e732c7d4d0aac5feb67e7963b83
---

 src/libbluray/disc/bdplus.c |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/libbluray/disc/bdplus.c b/src/libbluray/disc/bdplus.c
index 363719f..4f08084 100644
--- a/src/libbluray/disc/bdplus.c
+++ b/src/libbluray/disc/bdplus.c
@@ -57,15 +57,19 @@ static void _libbdplus_close(BD_BDPLUS *p)
     }
 }
 
-void libbdplus_unload(BD_BDPLUS **p)
+static void _unload(BD_BDPLUS *p)
 {
-    if (p && *p) {
-        _libbdplus_close(*p);
+    _libbdplus_close(p);
 
-        if ((*p)->h_libbdplus) {
-            dl_dlclose((*p)->h_libbdplus);
-        }
+    if (p->h_libbdplus) {
+        dl_dlclose(p->h_libbdplus);
+    }
+}
 
+void libbdplus_unload(BD_BDPLUS **p)
+{
+    if (p && *p) {
+        _unload(*p);
         X_FREE(*p);
     }
 }



More information about the libbluray-devel mailing list