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);
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) {
}
}
+ 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);