[vlc-commits] access: bluray: define READ_SIZE
Francois Cartegnie
git at videolan.org
Tue Oct 30 18:12:22 CET 2018
vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jul 4 15:51:38 2018 +0200| [dd103f6b8da34633b29ac3a8cdedf633ed6dbab9] | committer: Francois Cartegnie
access: bluray: define READ_SIZE
(cherry picked from commit 443250a0f52e9c20e22bd3b30ed7c1bf8b9fb5ce)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=dd103f6b8da34633b29ac3a8cdedf633ed6dbab9
---
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 69eab57696..f39115d352 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -2477,13 +2477,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;
@@ -2493,11 +2494,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