]> git.sesse.net Git - vlc/commitdiff
bluray: Check for read error when menu are enabled.
authorHugo Beauzée-Luyssen <beauze.h@gmail.com>
Sat, 10 Mar 2012 14:54:43 +0000 (15:54 +0100)
committerHugo Beauzée-Luyssen <beauze.h@gmail.com>
Sat, 10 Mar 2012 14:55:21 +0000 (15:55 +0100)
This fixes crash with BD-J menu, if libbluray isn't built with java
support.

modules/access/bluray.c

index f5b3dcb6b8342eea811176c5d13086c739cdd806..67d0f5c3dea46d180534b3a50df650f4b529c80e 100644 (file)
@@ -1000,6 +1000,8 @@ static int blurayDemux(demux_t *p_demux)
         BD_EVENT e;
         nread = bd_read_ext(p_sys->bluray, p_block->p_buffer,
                             NB_TS_PACKETS * BD_TS_PACKET_SIZE, &e);
+        if (nread < 0)
+            return -1;
         if (nread == 0) {
             if (e.event == BD_EVENT_NONE)
                 msg_Info(p_demux, "We reached the end of a title");