Commit 6139440a authored by Marian Durkovic's avatar Marian Durkovic

use visible width/height in crop filter

parent e6cdbf3d
......@@ -146,6 +146,7 @@ static int Init( vout_thread_t *p_vout )
p_vout->output.i_width = p_vout->render.i_width;
p_vout->output.i_height = p_vout->render.i_height;
p_vout->output.i_aspect = p_vout->render.i_aspect;
p_vout->fmt_out = p_vout->fmt_in;
/* Shall we use autocrop ? */
p_vout->p_sys->b_autocrop = config_GetInt( p_vout, "autocrop" );
......@@ -232,9 +233,10 @@ static int Init( vout_thread_t *p_vout )
}
else
{
p_vout->p_sys->i_width = p_vout->output.i_width;
p_vout->p_sys->i_height = p_vout->output.i_height;
p_vout->p_sys->i_x = p_vout->p_sys->i_y = 0;
p_vout->p_sys->i_width = p_vout->fmt_out.i_visible_width;
p_vout->p_sys->i_height = p_vout->fmt_out.i_visible_height;
p_vout->p_sys->i_x = p_vout->fmt_out.i_x_offset;
p_vout->p_sys->i_y = p_vout->fmt_out.i_y_offset;
}
/* Pheeew. Parsing done. */
......@@ -244,9 +246,9 @@ static int Init( vout_thread_t *p_vout )
p_vout->p_sys->b_autocrop ? "" : "not " );
/* Set current output image properties */
p_vout->p_sys->i_aspect = p_vout->output.i_aspect
* p_vout->output.i_height / p_vout->p_sys->i_height
* p_vout->p_sys->i_width / p_vout->output.i_width;
p_vout->p_sys->i_aspect = p_vout->fmt_out.i_aspect
* p_vout->fmt_out.i_visible_height / p_vout->p_sys->i_height
* p_vout->p_sys->i_width / p_vout->fmt_out.i_visible_width;
fmt.i_width = fmt.i_visible_width = p_vout->p_sys->i_width;
fmt.i_height = fmt.i_visible_height = p_vout->p_sys->i_height;
......
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