[vlc-commits] access: bluray: process events after a read

Francois Cartegnie git at videolan.org
Tue Oct 30 18:12:35 CET 2018


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Oct 18 18:48:25 2018 +0200| [1b89390f7832ea13e7e80e30fe5be2c81e5894b3] | committer: Francois Cartegnie

access: bluray: process events after a read

A truncated read can occur on clip boundary
whose events must be handled

(cherry picked from commit 52e61cda8c05d0f97ae266f1eba94b533375d8a9)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=1b89390f7832ea13e7e80e30fe5be2c81e5894b3
---

 modules/access/bluray.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index 6d44902656..2003b4dce0 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -2635,10 +2635,9 @@ static int blurayDemux(demux_t *p_demux)
     int nread;
 
     if (p_sys->b_menu == false) {
+        nread = bd_read(p_sys->bluray, p_block->p_buffer, BD_READ_SIZE);
         while (bd_get_event(p_sys->bluray, &e))
             blurayHandleEvent(p_demux, &e);
-
-        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, BD_READ_SIZE, &e);
         while (e.event != BD_EVENT_NONE) {



More information about the vlc-commits mailing list