Commit b2eb0df3 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen Committed by Jean-Baptiste Kempf

bluray: Check for read error when menu are enabled.

This fixes crash with BD-J menu, if libbluray isn't built with java
support.
(cherry picked from commit 3bc5c401996090ef409d0c76fd59c1d009b80c00)
(cherry picked from commit 96b0289176abe5a24eb1f854e74654b3c55d0574)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 5f401c33
......@@ -1000,6 +1000,11 @@ 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)
{
block_Release(p_block);
return -1;
}
if (nread == 0) {
if (e.event == BD_EVENT_NONE)
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