[vlc-commits] [Git][videolan/vlc][master] spudec: set the subpicture original dimensions based on the SPU properties

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Oct 29 10:38:55 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
9a0d9c98 by Steve Lhomme at 2024-10-29T10:16:07+00:00
spudec: set the subpicture original dimensions based on the SPU properties

If p_spu_properties->i_x/y is set (a few lines below), then the width/height
too.

- - - - -


1 changed file:

- modules/codec/spudec/parse.c


Changes:

=====================================
modules/codec/spudec/parse.c
=====================================
@@ -871,6 +871,13 @@ static int Render( decoder_t *p_dec, subpicture_t *p_spu,
     }
     vlc_spu_regions_push(&p_spu->regions, p_region);
 
+    if (p_spu->i_original_picture_width == 0 && p_spu->i_original_picture_height == 0)
+    {
+        assert(p_spu_properties->i_width != 0);
+        assert(p_spu_properties->i_height != 0);
+        p_spu->i_original_picture_width  = p_spu_properties->i_width;
+        p_spu->i_original_picture_height = p_spu_properties->i_height;
+    }
     p_region->b_absolute = true;
     p_region->i_x = p_spu_properties->i_x;
     p_region->i_y = p_spu_properties->i_y + p_spu_data->i_y_top_offset;



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

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/9a0d9c98ebdc16450eb3a525df4f896359733d4f
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