[vlc-devel] [PATCH 3/3] bluray: Handle overlay when no data is returned
Petri Hintukainen
phintuka at users.sourceforge.net
Mon Feb 10 12:27:04 CET 2014
Fixes HDMV menus with still image background and BD-J menus without background video.
Remove incorrect end of title log message.
---
modules/access/bluray.c | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index 1544d64..ad7f0aa 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -1529,10 +1529,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);
@@ -1540,16 +1536,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) {
@@ -1568,6 +1554,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);
--
1.8.3.2
More information about the vlc-devel
mailing list