From b92c25d085099499063edb5e8a15c4dbb17aa3cd Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Tue, 26 Mar 2024 14:13:03 +0100 Subject: [PATCH] subpicture: init the position of the PIP region It's positioned at the center of the display by default as the PIP doesn't set any alignment or set the absolute flag. It was the value set by the calloc before 4f0d7e7731854c5ab6ac6a338867c27745b8ad3d. --- src/misc/subpicture.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/misc/subpicture.c b/src/misc/subpicture.c index 041749ce4d..3133fabee2 100644 --- a/src/misc/subpicture.c +++ b/src/misc/subpicture.c @@ -164,6 +164,9 @@ subpicture_t *subpicture_NewFromPicture( vlc_object_t *p_obj, p_region->fmt.i_sar_num = p_region->fmt.i_sar_den = 0; + // margin to the center or to the top/left if the subpicture is absolute + p_region->i_x = 0; + p_region->i_y = 0; vlc_spu_regions_push( &p_subpic->regions, p_region ); return p_subpic;