[vlc-commits] access: bluray: check overlay

Francois Cartegnie git at videolan.org
Mon Mar 9 10:40:40 CET 2020


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Mar  2 16:36:52 2020 +0100| [4e27fb6522509f2fbae4afee0ea93df2ecb56352] | committer: Francois Cartegnie

access: bluray: check overlay

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4e27fb6522509f2fbae4afee0ea93df2ecb56352
---

 modules/access/bluray.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index 39606d75c6..8c6f2859b5 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -1817,6 +1817,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->bdj.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.
@@ -1869,6 +1872,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->bdj.p_overlays[plane];
 
+    if(!ov)
+        return;
+
     vlc_mutex_lock(&ov->lock);
 
     subpicture_region_ChainDelete(ov->p_regions);
@@ -1887,6 +1893,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->bdj.p_overlays[eventov->plane];
+    if(!ov)
+        return;
+
     /*
      * Compute a subpicture_region_t.
      * It will be copied and sent to the vout later.
@@ -2015,6 +2024,8 @@ 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->bdj.p_overlays[eventov->plane];
+    if(!ov)
+        return;
     vlc_mutex_lock(&ov->lock);
 
     if (!ov->p_regions)



More information about the vlc-commits mailing list