From 2cdbaaf31c85b27923c1795b5c4e3e576cdb4567 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 20 Nov 2012 17:20:45 +0100 Subject: osd: fix OSD status symbol display in some cases The playback status symbol in the OSD status display on video (such as displayed when seeking or with the show_progress input command) sometimes kept displaying the last seek, without resetting the symbol. (For example: disable the OSD, seek, enable the OSD, run show_progress; but also other cases.) The main reason for that was the code clearing the OSD bar is also responsible for clearing the osd_function (which stores the playback symbol). If no OSD bar was set, the osd_function was never reset. Fix by always setting the timer for clearing the OSD bar and the osd_function whenever the osd_function is set. Clearing the OSD bar when it wasn't set is OK. If the OSD bar is set some time after osd_function is set, the timer is overwritten - that's a good thing, as it makes both disappear from the screen at exactly the same time. Always reset osd_function to 0 and determine the playback status explicitly from mpctx->paused when displaying the status on screen. --- core/mp_osd.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core/mp_osd.h') diff --git a/core/mp_osd.h b/core/mp_osd.h index 444b54736c..78957fb3bf 100644 --- a/core/mp_osd.h +++ b/core/mp_osd.h @@ -42,4 +42,7 @@ void set_osd_msg(struct MPContext *mpctx, int id, int level, int time, const cha void set_osd_tmsg(struct MPContext *mpctx, int id, int level, int time, const char* fmt, ...); void rm_osd_msg(struct MPContext *mpctx, int id); +// osd_function is the symbol appearing in the video status, such as OSD_PLAY +void set_osd_function(struct MPContext *mpctx, int osd_function); + #endif /* MPLAYER_MP_OSD_H */ -- cgit v1.2.3