[vlc-commits] access: bluray: check overlay
Francois Cartegnie
git at videolan.org
Mon Mar 9 10:48:07 CET 2020
vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Mar 2 16:36:52 2020 +0100| [a8806573ff2d64d21ce61cb154cd8e2eba1aa553] | committer: Francois Cartegnie
access: bluray: check overlay
(cherry picked from commit 4e27fb6522509f2fbae4afee0ea93df2ecb56352)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=a8806573ff2d64d21ce61cb154cd8e2eba1aa553
---
modules/access/bluray.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index b6ece4922e..0f3f1d4be2 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -1654,6 +1654,9 @@ static void blurayActivateOverlay(demux_t *p_demux, int plane)
demux_sys_t *p_sys = p_demux->p_sys;
bluray_overlay_t *ov = p_sys->p_overlays[plane];
+ if(!ov)
+ return;
+
/*
* If the overlay is already displayed, mark the picture as outdated.
* We must NOT use vout_PutSubpicture if a picture is already displayed.
@@ -1706,6 +1709,9 @@ static void blurayClearOverlay(demux_t *p_demux, int plane)
demux_sys_t *p_sys = p_demux->p_sys;
bluray_overlay_t *ov = p_sys->p_overlays[plane];
+ if(!ov)
+ return;
+
vlc_mutex_lock(&ov->lock);
subpicture_region_ChainDelete(ov->p_regions);
@@ -1724,6 +1730,9 @@ static void blurayDrawOverlay(demux_t *p_demux, const BD_OVERLAY* const eventov)
demux_sys_t *p_sys = p_demux->p_sys;
bluray_overlay_t *ov = p_sys->p_overlays[eventov->plane];
+ if(!ov)
+ return;
+
/*
* Compute a subpicture_region_t.
* It will be copied and sent to the vout later.
@@ -1862,6 +1871,9 @@ static void blurayDrawArgbOverlay(demux_t *p_demux, const BD_ARGB_OVERLAY* const
demux_sys_t *p_sys = p_demux->p_sys;
bluray_overlay_t *ov = p_sys->p_overlays[eventov->plane];
+ if(!ov)
+ return;
+
vlc_mutex_lock(&ov->lock);
/* Find a region to update */
More information about the vlc-commits
mailing list