[libbluray-devel] Added missing libaacs error code. Check for no errors from aacs_open2().

npzacs git at videolan.org
Sun Apr 29 19:58:05 CEST 2012


libbluray | branch: master | npzacs <npzacs at gmail.com> | Sun Apr 29 20:57:08 2012 +0300| [0ea13c532f0ab255a2919260f4cebb93692daef4] | committer: npzacs

Added missing libaacs error code. Check for no errors from aacs_open2().

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

 src/libbluray/bluray.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index ecaee79..e1b333c 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -710,7 +710,7 @@ static int _libaacs_open(BLURAY *bd, const char *keyfile_path)
         bd->aacs = aacs_open2(bd->device_path, keyfile_path, &error_code);
     }
 
-    if (bd->aacs) {
+    if (bd->aacs && !error_code) {
         BD_DEBUG(DBG_BLURAY, "Opened libaacs (%p)\n", bd->aacs);
         bd->disc_info.aacs_handled = 1;
         return 1;
@@ -738,6 +738,7 @@ static int _libaacs_open(BLURAY *bd, const char *keyfile_path)
             bd->disc_info.aacs_error_code = BD_AACS_CERT_REVOKED;
             break;
         case -6: /* AACS_ERROR_MMC_OPEN */
+        case -7: /* AACS_ERROR_MMC_FAILURE */
             bd->disc_info.aacs_error_code = BD_AACS_MMC_FAILED;
             break;
     }



More information about the libbluray-devel mailing list