[vlc-commits] bluray: Check for read error when menu are enabled.

Hugo Beauzée-Luyssen git at videolan.org
Sat Mar 10 15:56:54 CET 2012


vlc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Sat Mar 10 15:54:43 2012 +0100| [3bc5c401996090ef409d0c76fd59c1d009b80c00] | committer: Hugo Beauzée-Luyssen

bluray: Check for read error when menu are enabled.

This fixes crash with BD-J menu, if libbluray isn't built with java
support.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3bc5c401996090ef409d0c76fd59c1d009b80c00
---

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

diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index f5b3dcb..67d0f5c 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -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");



More information about the vlc-commits mailing list