Commit e0fb9220 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Stay polite

parent 31a51c3e
...@@ -907,18 +907,12 @@ void vout_EnableFilter( vout_thread_t *p_vout, char *psz_name, ...@@ -907,18 +907,12 @@ void vout_EnableFilter( vout_thread_t *p_vout, char *psz_name,
static void InitWindowSize( vout_thread_t *p_vout, unsigned *pi_width, static void InitWindowSize( vout_thread_t *p_vout, unsigned *pi_width,
unsigned *pi_height ) unsigned *pi_height )
{ {
vlc_value_t val;
int i_width, i_height;
uint64_t ll_zoom;
#define FP_FACTOR 1000 /* our fixed point factor */ #define FP_FACTOR 1000 /* our fixed point factor */
var_Get( p_vout, "width", &val ); int i_width = var_GetInteger( p_vout, "width" );
i_width = val.i_int; int i_height = var_GetInteger( p_vout, "height" );
var_Get( p_vout, "height", &val ); float f_zoom = var_GetFloat( p_vout, "zoom" );
i_height = val.i_int; uint64_t ll_zoom = (uint64_t)( FP_FACTOR * f_zoom );
var_Get( p_vout, "zoom", &val );
ll_zoom = (uint64_t)( FP_FACTOR * val.f_float );
if( i_width > 0 && i_height > 0) if( i_width > 0 && i_height > 0)
{ {
...@@ -944,7 +938,7 @@ static void InitWindowSize( vout_thread_t *p_vout, unsigned *pi_width, ...@@ -944,7 +938,7 @@ static void InitWindowSize( vout_thread_t *p_vout, unsigned *pi_width,
} }
if( p_vout->fmt_in.i_sar_num == 0 || p_vout->fmt_in.i_sar_den == 0 ) { if( p_vout->fmt_in.i_sar_num == 0 || p_vout->fmt_in.i_sar_den == 0 ) {
msg_Warn( p_vout, "fucked up aspect" ); msg_Warn( p_vout, "aspect ratio screwed up" );
*pi_width = (int)( p_vout->fmt_in.i_visible_width * ll_zoom / FP_FACTOR ); *pi_width = (int)( p_vout->fmt_in.i_visible_width * ll_zoom / FP_FACTOR );
*pi_height = (int)( p_vout->fmt_in.i_visible_height * ll_zoom /FP_FACTOR); *pi_height = (int)( p_vout->fmt_in.i_visible_height * ll_zoom /FP_FACTOR);
} }
......
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