free( val.psz_string );
free( format.psz_string );
+ fmt_out.i_width = var_GetInteger( p_vout, "snapshot-width" );
+ fmt_out.i_height = var_GetInteger( p_vout, "snapshot-height" );
+
+ if( fmt_out.i_width == 0 && fmt_out.i_height > 0 )
+ {
+ float f = (float)p_vout->fmt_in.i_height / fmt_out.i_height;
+ fmt_out.i_width = p_vout->fmt_in.i_width / f;
+ }
+ else if( fmt_out.i_height == 0 && fmt_out.i_width > 0 )
+ {
+ float f = (float)p_vout->fmt_in.i_width / fmt_out.i_width;
+ fmt_out.i_height = p_vout->fmt_in.i_height / f;
+ }
+
/* Save the snapshot */
fmt_in = p_vout->fmt_in;
fmt_out.i_sar_num = fmt_out.i_sar_den = 1;