[vlc-commits] access: bluray: define READ_SIZE
Francois Cartegnie
git at videolan.org
Thu Jul 5 10:35:11 CEST 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jul 4 15:51:38 2018 +0200| [443250a0f52e9c20e22bd3b30ed7c1bf8b9fb5ce] | committer: Francois Cartegnie
access: bluray: define READ_SIZE
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=443250a0f52e9c20e22bd3b30ed7c1bf8b9fb5ce
---
modules/access/bluray.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index f529582bef..fd7b586281 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -2494,13 +2494,14 @@ static int onIntfEvent( vlc_object_t *p_input, char const *psz_var,
#define BD_TS_PACKET_SIZE (192)
#define NB_TS_PACKETS (200)
+#define BD_READ_SIZE (NB_TS_PACKETS * BD_TS_PACKET_SIZE)
static int blurayDemux(demux_t *p_demux)
{
demux_sys_t *p_sys = p_demux->p_sys;
BD_EVENT e;
- block_t *p_block = block_Alloc(NB_TS_PACKETS * (int64_t)BD_TS_PACKET_SIZE);
+ block_t *p_block = block_Alloc(BD_READ_SIZE);
if (!p_block)
return VLC_DEMUXER_EGENERIC;
@@ -2510,11 +2511,9 @@ static int blurayDemux(demux_t *p_demux)
while (bd_get_event(p_sys->bluray, &e))
blurayHandleEvent(p_demux, &e);
- nread = bd_read(p_sys->bluray, p_block->p_buffer,
- NB_TS_PACKETS * BD_TS_PACKET_SIZE);
+ nread = bd_read(p_sys->bluray, p_block->p_buffer, BD_READ_SIZE);
} else {
- nread = bd_read_ext(p_sys->bluray, p_block->p_buffer,
- NB_TS_PACKETS * BD_TS_PACKET_SIZE, &e);
+ nread = bd_read_ext(p_sys->bluray, p_block->p_buffer, BD_READ_SIZE, &e);
while (e.event != BD_EVENT_NONE) {
blurayHandleEvent(p_demux, &e);
bd_get_event(p_sys->bluray, &e);
More information about the vlc-commits
mailing list