[libbluray-devel] bd_get_current_angle(): check if title has been opened

hpi1 git at videolan.org
Sun Jan 23 23:20:54 CET 2011


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Jan 24 00:20:02 2011 +0200| [250f6068f86522cff1944bc2bb638158b6ca670b] | committer: hpi1

bd_get_current_angle(): check if title has been opened

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

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

diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index 707c88f..6cb7d91 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -1338,7 +1338,10 @@ int bd_select_angle(BLURAY *bd, unsigned angle)
 
 unsigned bd_get_current_angle(BLURAY *bd)
 {
-    return bd->title->angle;
+    if (bd->title) {
+        return bd->title->angle;
+    }
+    return 0;
 }
 
 



More information about the libbluray-devel mailing list