Mercurial > mplayer.hg
diff eosd.c @ 32397:b3110e526e19
EOSD: add a function to test if a source has already been registered.
Use it to avoid adding the ASS source twice.
author | cigaes |
---|---|
date | Tue, 12 Oct 2010 22:08:46 +0000 |
parents | b4c3659d16b1 |
children | fbee56276c87 |
line wrap: on
line diff
--- a/eosd.c Tue Oct 12 16:53:43 2010 +0000 +++ b/eosd.c Tue Oct 12 22:08:46 2010 +0000 @@ -44,6 +44,15 @@ *prev = src; } +int eosd_registered(struct mp_eosd_source *source) +{ + struct mp_eosd_source *p; + for (p = sources; p; p = p->priv_next) + if (p == source) + return 1; + return 0; +} + void eosd_configure(struct mp_eosd_settings *res) { if (res->w != settings.w ||