[libbluray-devel] commit: splitted _libaacs_close() and _libbdplus_close() (hpi1 )
git at videolan.org
git at videolan.org
Mon Oct 25 11:59:32 CEST 2010
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Oct 25 12:20:24 2010 +0300| [55dfce831c51df5684f62cbfd5be299d5d3875c5] | committer: hpi1
splitted _libaacs_close() and _libbdplus_close()
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=55dfce831c51df5684f62cbfd5be299d5d3875c5
---
src/libbluray/bluray.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index 60cf12c..504012d 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -405,6 +405,11 @@ static void _libaacs_close(BLURAY *bd)
DL_CALL(bd->h_libaacs, aacs_close, bd->aacs);
bd->aacs = NULL;
}
+}
+
+static void _libaacs_unload(BLURAY *bd)
+{
+ _libaacs_close(bd);
#ifdef DLOPEN_CRYPTO_LIBS
if (bd->h_libaacs) {
@@ -438,7 +443,7 @@ static int _libaacs_required(BLURAY *bd)
static int _libaacs_open(BLURAY *bd, const char *keyfile_path)
{
- _libaacs_close(bd);
+ _libaacs_unload(bd);
if (!_libaacs_required(bd)) {
/* no AACS */
@@ -491,6 +496,11 @@ static void _libbdplus_close(BLURAY *bd)
DL_CALL(bd->h_libbdplus, bdplus_free, bd->bdplus);
bd->bdplus = NULL;
}
+}
+
+static void _libbdplus_unload(BLURAY *bd)
+{
+ _libbdplus_close(bd);
#ifdef DLOPEN_CRYPTO_LIBS
if (bd->h_libbdplus) {
@@ -525,7 +535,7 @@ static int _libbdplus_required(BLURAY *bd)
static int _libbdplus_open(BLURAY *bd, const char *keyfile_path)
{
- _libbdplus_close(bd);
+ _libbdplus_unload(bd);
if (!_libbdplus_required(bd)) {
/* no BD+ */
@@ -616,9 +626,9 @@ void bd_close(BLURAY *bd)
{
bd_stop_bdj(bd);
- _libaacs_close(bd);
+ _libaacs_unload(bd);
- _libbdplus_close(bd);
+ _libbdplus_unload(bd);
_close_m2ts(&bd->st0);
_close_preload(&bd->st_ig);
More information about the libbluray-devel
mailing list