[vlc-devel] [PATCH 12/12] bluray: Don't crash when providing an incorrect path.

Hugo Beauzée-Luyssen beauze.h at gmail.com
Sun Jan 22 00:31:07 CET 2012


---
 modules/access/bluray.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index f019d22..2165f81 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -167,6 +167,11 @@ static int blurayOpen( vlc_object_t *object )
 
     /* Warning the user about AACS/BD+ */
     const BLURAY_DISC_INFO *disc_info = bd_get_disc_info(p_sys->bluray);
+    if ( disc_info->bluray_detected == 0 )
+    {
+        error_msg = "Path doesn't appear to be a bluray";
+        goto error;
+    }
     msg_Info(p_demux, "First play: %i, Top menu: %i\n"
                       "HDMV Titles: %i, BD-J Titles: %i, Other: %i",
              disc_info->first_play_supported, disc_info->top_menu_supported,
-- 
1.7.8.4




More information about the vlc-devel mailing list