[libbluray-devel] Avoid returning null for content certificate ID
hpi1
git at videolan.org
Tue Sep 22 14:02:43 CEST 2015
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Sep 14 13:52:36 2015 +0300| [73ce0c81af7de25a5c9c4cd5c367eeacea33dfe1] | committer: hpi1
Avoid returning null for content certificate ID
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=73ce0c81af7de25a5c9c4cd5c367eeacea33dfe1
---
.../bdj/java/com/aacsla/bluray/online/ContentAttribute.java | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/libbluray/bdj/java/com/aacsla/bluray/online/ContentAttribute.java b/src/libbluray/bdj/java/com/aacsla/bluray/online/ContentAttribute.java
index fbfa45d..62ecc92 100644
--- a/src/libbluray/bdj/java/com/aacsla/bluray/online/ContentAttribute.java
+++ b/src/libbluray/bdj/java/com/aacsla/bluray/online/ContentAttribute.java
@@ -27,10 +27,19 @@ public class ContentAttribute {
}
public byte[] getContentCertID() {
+ byte[] id = getContentCertID("AACS" + File.separator + "Content000.cer");
+ if (id != null) {
+ return id;
+ }
+
+ return new byte[6];
+ }
+
+ private byte[] getContentCertID(String file) {
FileInputStream is = null;
try {
is = new FileInputStream(
- System.getProperty("bluray.vfs.root") + File.separator + "AACS/Content000.cer");
+ System.getProperty("bluray.vfs.root") + File.separator + file);
if (is.skip(14) != 14)
return null;
byte[] bytes = new byte[6];
More information about the libbluray-devel
mailing list