[MPlayer-dev-eng] [PATCH] demuxer-independent attachments

Evgeniy Stepanov eugeni.stepanov at gmail.com
Tue Jan 8 12:45:10 CET 2008


On Tuesday 08 January 2008 14:20:05 Uoti Urpala wrote:
> [Evgeniy]
>
> >> The chunk with ass_add_font could be moved to mplayer.c, right
> >> after the demuxer is opened. It makes sense because it deals with a
> >> global (per-file, to be exact) object.
>
> [you]
>
> > it would be even worse: initialization and cleanup can't be split
> > in different files.

The corresponding cleanup is removing font data from ass_library. It is 
currently missing, and it will be added also to mplayer.c.

> > +#ifdef USE_ASS
> > +#include "libass/ass.h"
> > +#include "libass/ass_mp.h"
> > +#endif
> >
> > in demuxer.h is equally unclean, IMO
>
> The patch did not add that to demuxer.h, but did add it to demuxer.c.
> Probably it wouldn't be needed either with the proposed changed version.

It will still be needed for that other patch, which deals with ass_track 
initialization and cleanup. It seems unavoidable, because ass_track needs to 
be associated with demuxer subtitle track. Consequently, it has to be freed 
in free_sh_sub(). Doing this everywhere free_sh_sub() is called is much less 
clean.



More information about the MPlayer-dev-eng mailing list