Commit 54f65066 authored by Gildas Bazin's avatar Gildas Bazin

* modules/video_filter/scale.c: Fixed bug reported by Wallace Wadge (wwadge at gmail).

parent 09d1a3ea
......@@ -133,12 +133,16 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
p_filter->fmt_out.video.i_height / 2 ) /
p_filter->fmt_out.video.i_height;
l = __MIN( (int)p_filter->fmt_in.video.i_height - 1, l );
for( j = 0; j < p_pic_dst->p[i_plane].i_visible_pitch; j++ )
{
k = ( p_filter->fmt_in.video.i_width * j +
p_filter->fmt_out.video.i_width / 2 ) /
p_filter->fmt_out.video.i_width;
k = __MIN( (int)p_filter->fmt_in.video.i_width - 1, k );
p_dst[i * i_dst_pitch + j] = p_src[l * i_src_pitch + k];
}
}
......
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