Commit fecca450 authored by Petri Hintukainen's avatar Petri Hintukainen Committed by Jean-Baptiste Kempf

bluray: Handle overlay when no data is returned

Fixes HDMV menus with still image background and BD-J menus without background video.
Remove incorrect end of title log message.
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent f314ee2a
......@@ -1539,10 +1539,6 @@ static int blurayDemux(demux_t *p_demux)
nread = bd_read(p_sys->bluray, p_block->p_buffer,
NB_TS_PACKETS * BD_TS_PACKET_SIZE);
if (nread < 0) {
block_Release(p_block);
return nread;
}
} else {
nread = bd_read_ext(p_sys->bluray, p_block->p_buffer,
NB_TS_PACKETS * BD_TS_PACKET_SIZE, &e);
......@@ -1550,16 +1546,6 @@ static int blurayDemux(demux_t *p_demux)
blurayHandleEvent(p_demux, &e);
bd_get_event(p_sys->bluray, &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");
block_Release(p_block);
return 1;
}
}
if (p_sys->current_overlay != -1) {
......@@ -1578,6 +1564,13 @@ static int blurayDemux(demux_t *p_demux)
}
}
if (nread <= 0) {
block_Release(p_block);
if (nread < 0)
return -1;
return 1;
}
p_block->i_buffer = nread;
stream_DemuxSend(p_sys->p_parser, p_block);
......
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