diff options
Diffstat (limited to 'sub/sub.c')
-rw-r--r-- | sub/sub.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1239,9 +1239,18 @@ struct osd_state *osd_create(void) #ifdef CONFIG_FREETYPE force_load_font = 1; #endif + osd_set_text(osd, NULL); return osd; } +void osd_set_text(struct osd_state *osd, const char *text) { + talloc_free(osd->osd_text); + //osd->text must never be NULL + if (!text) + text = ""; + osd->osd_text = talloc_strdup(osd, text); +} + int vo_osd_changed_flag=0; void osd_remove_text(struct osd_state *osd, int dxs, int dys, |