Skip to content

Commit

Permalink
spudec: set the subpicture original dimensions based on the SPU prope…
Browse files Browse the repository at this point in the history
…rties

If p_spu_properties->i_x/y is set (a few lines below), then the width/height
too.
  • Loading branch information
robUx4 committed Oct 29, 2024
1 parent 06993b6 commit 9a0d9c9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/codec/spudec/parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9a0d9c9

Please sign in to comment.