[MPlayer-dev-eng] [patch] command.c does not update set_of_ass_tracks together with set_of_subtitles

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Jan 22 23:29:34 CET 2010

On Fri, Jan 22, 2010 at 12:21:15PM +0300, Yuriy Kaminskiy wrote:
> When in command.c mplayer manipulates mpctx->set_of_subtitles, it does not
> update mpctx->set_of_ass_tracks too. This leads to memory leaks and desync
> between set_of_subtitles and set_of_ass_tracks contents: (with -ass) load 1.srt
> 2.srt, remove 1.srt, then switch to 2.srt, this will display ass-ified data from
> 1.srt.

Thanks, applied after cleaning up the code first and removed some IMO unnecessary
checks (ass_enabled should not really matter).
Please test and tell me if I messed something up.
I also fixed two other rather major memleaks (i.e. about the size of the largest
subtitle line and the whole subtitle file respectively) related to subtitle loading/

> Second part should solve similar problem for gui-loaded subs (not tested).

Haven't done anything about that one yet.

More information about the MPlayer-dev-eng mailing list