]> git.sesse.net Git - vlc/commitdiff
Bluray: use meaningful error messages when available.
authorKonstantin Pavlov <thresh@videolan.org>
Fri, 18 May 2012 06:40:54 +0000 (10:40 +0400)
committerKonstantin Pavlov <thresh@videolan.org>
Wed, 23 May 2012 07:58:40 +0000 (11:58 +0400)
modules/access/bluray.c

index eea10d47fad265d7380cc8f4ca115395ef1e1d45..77327e12921b3c8e3a1f4b295e53b2c56c4ff8c3 100644 (file)
@@ -234,9 +234,35 @@ static int blurayOpen( vlc_object_t *object )
             goto error;
         }
         if (!disc_info->aacs_handled) {
+#ifdef BD_AACS_CORRUPTED_DISC
+            if (disc_info->aacs_error_code) {
+                switch (disc_info->aacs_error_code) {
+                    case BD_AACS_CORRUPTED_DISC:
+                        error_msg = _("BluRay Disc is corrupted.");
+                        break;
+                    case BD_AACS_NO_CONFIG:
+                        error_msg = _("Missing AACS configuration file!");
+                        break;
+                    case BD_AACS_NO_PK:
+                        error_msg = _("No valid processing key found in AACS config file.");
+                        break;
+                    case BD_AACS_NO_CERT:
+                        error_msg = _("No valid host certificate found in AACS config file.");
+                        break;
+                    case BD_AACS_CERT_REVOKED:
+                        error_msg = _("AACS Host certificate revoked.");
+                        break;
+                    case BD_AACS_MMC_FAILED:
+                        error_msg = _("AACS MMC failed.");
+                        break;
+                }
+                goto error;
+            }
+#else
             error_msg = _("Your system AACS decoding library does not work. "
                       "Missing keys?");
             goto error;
+#endif /* BD_AACS_CORRUPTED_DISC */
         }
     }