Commit 92766556 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* backport [18601] [18602]

Don't allow negative offsets when blending subpictures
parent 3951cced
......@@ -728,6 +728,9 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
}
i_x_offset = __MAX( i_x_offset, 0 );
i_y_offset = __MAX( i_y_offset, 0 );
if( p_spu->i_margin != 0 && p_spu->b_force_crop == VLC_FALSE )
{
int i_diff = 0;
......@@ -800,6 +803,9 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
}
}
i_x_offset = __MAX( i_x_offset, 0 );
i_y_offset = __MAX( i_y_offset, 0 );
p_spu->p_blend->pf_video_blend( p_spu->p_blend, p_pic_dst,
p_pic_src, &p_region->picture, i_x_offset, i_y_offset,
i_fade_alpha * p_subpic->i_alpha / 255 );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment