[MPlayer-dev-eng] New -subfont option

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon May 7 18:26:43 CEST 2007


Hello,

> @@ -829,12 +831,18 @@
>  	if (defer_counter >= FONT_LOAD_DEFER) force_load_font = 1;
>      }
>  
> -    if (!vo_font || force_load_font) {
> +    if (force_load_font) {
>  	force_load_font = 0;
> -	load_font_ft(dxs, dys);
> +	load_font_ft(dxs, dys, &vo_font, font_name);
> +        load_font_ft(dxs, dys, &sub_font, sub_font_name);

The indentation of these two does not match (original code uses a tab).
Also vo_font and sub_font take "return" values, IMO add it as the first
parameter.

>  	prev_dxs = dxs;
>  	prev_dys = dys;
>  	defer_counter = 0;
> +    } else {
> +        if (!vo_font) 
> +            load_font_ft(dxs, dys, &vo_font, font_name);
> +        if (!sub_font) 
> +            load_font_ft(dxs, dys, &sub_font, sub_font_name);
>      }

Can't you just use
> if (!vo_font || !sub_font || force_load_font)
instead of adding this else?

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list