Commit 3bc5c401 authored by Hugo Beauzée-Luyssen's avatar 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.
parent 207e13c2
...@@ -1000,6 +1000,8 @@ static int blurayDemux(demux_t *p_demux) ...@@ -1000,6 +1000,8 @@ static int blurayDemux(demux_t *p_demux)
BD_EVENT e; BD_EVENT e;
nread = bd_read_ext(p_sys->bluray, p_block->p_buffer, nread = bd_read_ext(p_sys->bluray, p_block->p_buffer,
NB_TS_PACKETS * BD_TS_PACKET_SIZE, &e); NB_TS_PACKETS * BD_TS_PACKET_SIZE, &e);
if (nread < 0)
return -1;
if (nread == 0) { if (nread == 0) {
if (e.event == BD_EVENT_NONE) if (e.event == BD_EVENT_NONE)
msg_Info(p_demux, "We reached the end of a title"); msg_Info(p_demux, "We reached the end of a title");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment