Commit feec7814 authored by Ilkka Ollakka's avatar Ilkka Ollakka Committed by Antoine Cellerier

Take care of different input/canvas aspect-ratio

(cherry picked from commit 855f9738)
parent 56285c17
......@@ -164,11 +164,15 @@ static int Activate( vlc_object_t *p_this )
fmt.video.i_width = i_width;
fmt.video.i_height = ( p_filter->fmt_in.video.i_height * i_width )
/ p_filter->fmt_in.video.i_width;
fmt.video.i_height = ( fmt.video.i_height * i_aspect )
/ p_filter->fmt_in.video.i_aspect;
if( fmt.video.i_height > i_height )
{
fmt.video.i_height = i_height;
fmt.video.i_width = ( p_filter->fmt_in.video.i_width * i_height )
/ p_filter->fmt_in.video.i_height;
fmt.video.i_width = ( fmt.video.i_width * p_filter->fmt_in.video.i_aspect )
/ i_aspect;
if( fmt.video.i_width & 1 ) fmt.video.i_width -= 1;
i_padd = (i_width - fmt.video.i_width) / 2;
i_offset = (i_padd & 1);
......
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