[vlc-commits] access: bluray: check overlay number
Francois Cartegnie
git at videolan.org
Mon Mar 9 14:51:59 CET 2020
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Mar 9 14:29:17 2020 +0100| [11443e26eaca84755b0d3417a82a780cc5e628cc] | committer: Francois Cartegnie
access: bluray: check overlay number
should not happen for now, but 3D comments of libbluray
mentions possible additional overlays
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=11443e26eaca84755b0d3417a82a780cc5e628cc
---
modules/access/bluray.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index 252c625f3e..d902fc5285 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -1998,6 +1998,9 @@ static void blurayOverlayProc(void *ptr, const BD_OVERLAY *const overlay)
return;
}
+ if(overlay->plane >= MAX_OVERLAY)
+ return;
+
switch (overlay->cmd) {
case BD_OVERLAY_INIT:
msg_Info(p_demux, "Initializing overlay");
@@ -2098,6 +2101,9 @@ static void blurayArgbOverlayProc(void *ptr, const BD_ARGB_OVERLAY *const overla
demux_t *p_demux = (demux_t*)ptr;
demux_sys_t *p_sys = p_demux->p_sys;
+ if(overlay->plane >= MAX_OVERLAY)
+ return;
+
switch (overlay->cmd) {
case BD_ARGB_OVERLAY_INIT:
vlc_mutex_lock(&p_sys->bdj.lock);
More information about the vlc-commits
mailing list