[MPlayer-dev-eng] [PATCH] SSA/ASS subtitles support

Uoti Urpala uoti.urpala at pp1.inet.fi
Fri Apr 21 15:36:23 CEST 2006


On Fri, 2006-04-21 at 16:52 +0400, Evgeniy Stepanov wrote:
> On Friday 21 April 2006 06:44, Uoti Urpala wrote:
> > +demux_mkv_read_attachments (demuxer_t *demuxer)
> >
> > The memory allocated in this function is never freed. 
> 
> Attachments are kept in mkv_demuxer_t in the same way as chapters and indices, 
> just for uniformity. This could be used in the future to write fonts to disk 
> only when they are needed, or even to open them directly from memory.
> 
> If you think this takes too much memory, I can comment it out for now.

It's ok to keep it in memory while the file is being played, but MPlayer
can be used to play multiple files without exiting in between. The
attachment structures should be freed in demux_close_mkv, like the
chapters are. Have you considered playing multiple files elsewhere in
the code (I didn't check whether things are reinitialized properly)?

> > Embedded fonts are 
> > saved under the user's .mplayer directory, I think there should be at
> > least an option to turn off such creation of new files. 
> 
> What should be the default value of such option ? Maybe simply not save the 
> fonts when ~/.mplayer/fonts does not exist ?

As you said, if the attachments are kept in memory anyway you could save
them only if/when the subtitles are enabled. I'm not sure what the
policy should be otherwise, except that there should at least be some
way to disable creating new files.





More information about the MPlayer-dev-eng mailing list