Skip to content
Snippets Groups Projects
Commit 350ea55e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

wall: do not allocate dummy picture on stack

Fixes #27011.
parent aadbaeb4
No related branches found
No related tags found
1 merge request!1997wall: do not allocate dummy picture on stack
Pipeline #225832 passed with stage
in 19 minutes and 8 seconds
......@@ -267,17 +267,20 @@ static int Filter( video_splitter_t *p_splitter, picture_t *pp_dst[], picture_t
picture_t *p_dst = pp_dst[p_output->i_output];
/* */
picture_t tmp = *p_src;
for( int i = 0; i < tmp.i_planes; i++ )
for( int i = 0; i < p_src->i_planes; i++ )
{
plane_t *p0 = &tmp.p[0];
plane_t *p = &tmp.p[i];
const int i_y = p_output->i_top * p->i_visible_pitch / p0->i_visible_pitch;
const int i_x = p_output->i_left * p->i_visible_lines / p0->i_visible_lines;
p->p_pixels += i_y * p->i_pitch + ( i_x - (i_x % p->i_pixel_pitch));
const plane_t *p0 = p_src->p;
plane_t p = p_src->p[i];
const int i_y = p_output->i_top * p.i_visible_pitch
/ p0->i_visible_pitch;
const int i_x = p_output->i_left * p.i_visible_lines
/ p0->i_visible_lines;
p.p_pixels += i_y * p.i_pitch
+ (i_x - (i_x % p.i_pixel_pitch));
plane_CopyPixels(p_dst->p + i, &p);
}
picture_Copy( p_dst, &tmp );
picture_CopyProperties(p_dst, p_src);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment