[vlc-commits] [Git][videolan/vlc][master] bluray: fix detection of pre-existing region

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Mar 29 14:46:15 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
b42abb9b by Steve Lhomme at 2024-03-29T14:19:00+00:00
bluray: fix detection of pre-existing region

p_reg is never NULL with a vlc_list and we don't have access to the
iterator outside of the loop.

- - - - -


1 changed file:

- modules/access/bluray.c


Changes:

=====================================
modules/access/bluray.c
=====================================
@@ -1890,14 +1890,18 @@ static void blurayDrawOverlay(demux_t *p_demux, const BD_OVERLAY* const eventov)
     vlc_mutex_lock(&ov->lock);
 
     /* Find a region to update */
-    subpicture_region_t *p_reg;
-    vlc_spu_regions_foreach(p_reg, &ov->regions) {
+    subpicture_region_t *p_reg = NULL;
+    subpicture_region_t *found;
+    vlc_spu_regions_foreach(found, &ov->regions) {
         if (p_reg->i_x == eventov->x &&
             p_reg->i_y == eventov->y &&
             p_reg->p_picture->format.i_width == eventov->w &&
             p_reg->p_picture->format.i_height == eventov->h &&
             p_reg->p_picture->format.i_chroma == VLC_CODEC_YUVP)
+        {
+            p_reg = found;
             break;
+        }
     }
 
     if (!eventov->img) {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b42abb9b0ddcf531546eef02fbb823edd12aa2a9

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b42abb9b0ddcf531546eef02fbb823edd12aa2a9
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list