[MPlayer-dev-eng] [RFC] EOSD improvements

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Jul 31 18:00:41 CEST 2010


On Fri, Jul 30, 2010 at 08:48:58PM +0200, Grigori Goronzy wrote:
> -ASS_Image* ass_mp_render_frame(ASS_Renderer *priv, ASS_Track* track, long long now, int* detect_change) {
> +EOSD_Image* ass_mp_render_frame(ASS_Renderer *priv, ASS_Track* track, long long now, int* detect_change) {
>  	if (ass_force_reload) {
>  		ass_set_margins(priv, ass_top_margin, ass_bottom_margin, 0, 0);
>  		ass_set_use_margins(priv, ass_use_margins);
>  		ass_set_font_scale(priv, ass_font_scale);
>  		ass_force_reload = 0;
>  	}
> -	return ass_render_frame(priv, track, now, detect_change);
> +	// currently, EOSD_Image and ASS_Image are the same, thus a cast is safe
> +	return (EOSD_Image *) ass_render_frame(priv, track, now, detect_change);

I think you should already with the first patch come up with something
that will work ones the types are different, otherwise there's no way
to know if your design is going to be even remotely useful or if there's
some mayor issue that means we'll just have to 100% revert it.
Also, once someone updates the libass copy or links against a different
version, the ASS_Image type might change without us having any control
over it.
I'd also suggest testing it by adding some type and randomly swapping
the order of things in EOSD_Image type an make sure everything still
works.


More information about the MPlayer-dev-eng mailing list