Commit 9ed0ed0e authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Some small modifications to crop and panoramix to repair calls for uninitialized variables.

Patch by Cedric Coquebert.
parent facdc262
...@@ -238,7 +238,7 @@ static int Init( vout_thread_t *p_vout ) ...@@ -238,7 +238,7 @@ static int Init( vout_thread_t *p_vout )
p_vout->p_sys->i_ratio = 0; p_vout->p_sys->i_ratio = 0;
else else
{ {
p_vout->p_sys->i_ratio = config_GetInt( p_vout, "ratio" ); p_vout->p_sys->i_ratio = config_GetInt( p_vout, "crop-ratio" );
// ratio < width / height => ratio = 0 (unchange ratio) // ratio < width / height => ratio = 0 (unchange ratio)
if (p_vout->p_sys->i_ratio < (p_vout->output.i_width * 1000) / p_vout->output.i_height) if (p_vout->p_sys->i_ratio < (p_vout->output.i_width * 1000) / p_vout->output.i_height)
p_vout->p_sys->i_ratio = 0; p_vout->p_sys->i_ratio = 0;
...@@ -353,15 +353,14 @@ static int Init( vout_thread_t *p_vout ) ...@@ -353,15 +353,14 @@ static int Init( vout_thread_t *p_vout )
p_vout->p_sys->i_width, p_vout->p_sys->i_height, p_vout->p_sys->i_width, p_vout->p_sys->i_height,
p_vout->p_sys->i_x, p_vout->p_sys->i_y, p_vout->p_sys->i_x, p_vout->p_sys->i_y,
p_vout->p_sys->b_autocrop ? "" : "not " ); p_vout->p_sys->b_autocrop ? "" : "not " );
#ifdef BEST_AUTOCROP
msg_Info( p_vout, "ratio %d", p_vout->p_sys->i_aspect / 432);
#endif
/* Set current output image properties */ /* Set current output image properties */
p_vout->p_sys->i_aspect = p_vout->fmt_out.i_aspect 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->fmt_out.i_visible_height / p_vout->p_sys->i_height
* p_vout->p_sys->i_width / p_vout->fmt_out.i_visible_width; * p_vout->p_sys->i_width / p_vout->fmt_out.i_visible_width;
#ifdef BEST_AUTOCROP
msg_Info( p_vout, "ratio %d", p_vout->p_sys->i_aspect / 432);
#endif
fmt.i_width = fmt.i_visible_width = p_vout->p_sys->i_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; fmt.i_height = fmt.i_visible_height = p_vout->p_sys->i_height;
fmt.i_x_offset = fmt.i_y_offset = 0; fmt.i_x_offset = fmt.i_y_offset = 0;
......
...@@ -636,6 +636,8 @@ static int Init( vout_thread_t *p_vout ) ...@@ -636,6 +636,8 @@ static int Init( vout_thread_t *p_vout )
p_vout->output.i_aspect = p_vout->render.i_aspect; p_vout->output.i_aspect = p_vout->render.i_aspect;
#ifdef OVERLAP #ifdef OVERLAP
p_vout->p_sys->b_has_changed = p_vout->p_sys->b_attenuate; p_vout->p_sys->b_has_changed = p_vout->p_sys->b_attenuate;
int i_video_x = var_GetInteger( p_vout, "video-x");
int i_video_y = var_GetInteger( p_vout, "video-y");
#ifdef GAMMA #ifdef GAMMA
if (p_vout->p_sys->b_attenuate) if (p_vout->p_sys->b_attenuate)
{ {
...@@ -836,8 +838,6 @@ static int Init( vout_thread_t *p_vout ) ...@@ -836,8 +838,6 @@ static int Init( vout_thread_t *p_vout )
else if (i_row == p_vout->p_sys->i_row -1) p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout->i_alignment |= VOUT_ALIGN_TOP; else if (i_row == p_vout->p_sys->i_row -1) p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout->i_alignment |= VOUT_ALIGN_TOP;
} }
// i_n : number of active pp_vout // i_n : number of active pp_vout
int i_video_x = var_GetInteger( p_vout, "video-x");
int i_video_y = var_GetInteger( p_vout, "video-y");
int i_index, i_n = p_vout->p_sys->i_vout; int i_index, i_n = p_vout->p_sys->i_vout;
for (i_index = p_vout->p_sys->i_vout; i_index >= 0; i_index--) if (!p_vout->p_sys->pp_vout[i_index].b_active) i_n -= 1; for (i_index = p_vout->p_sys->i_vout; i_index >= 0; i_index--) if (!p_vout->p_sys->pp_vout[i_index].b_active) i_n -= 1;
var_SetInteger( p_vout, "align", p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout->i_alignment ); var_SetInteger( p_vout, "align", p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout->i_alignment );
......
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