summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2012-02-25 13:49:29 +0100
committerwm4 <wm4@mplayer2.org>2012-02-25 13:49:29 +0100
commit3022129d85785fa0095e3bbf8df24988a21b1ee9 (patch)
tree91202cc792d96183e4200e4e1f0270f6115a057f
parent93d4dd46bf9c77bf097f26d52d0e1dfa913258c9 (diff)
downloadmpv-3022129d85785fa0095e3bbf8df24988a21b1ee9.tar.bz2
mpv-3022129d85785fa0095e3bbf8df24988a21b1ee9.tar.xz
osd: clear terminal OSD line with mp_msg() instead of printf
If mplayer is started with -msglevel cplayer=-1, there can't be any terminal OSD output, but the terminal line was still cleared unconditionally. Fix this by using mp_msg(), which will throw away the output to clear the terminal if disabled. Fixes #154.
-rw-r--r--mplayer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mplayer.c b/mplayer.c
index 1c2bc7efa3..e843c07436 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -1755,7 +1755,7 @@ static void update_osd_msg(struct MPContext *mpctx)
// Clear the term osd line
if (opts->term_osd && mpctx->terminal_osd_text[0]) {
mpctx->terminal_osd_text[0] = '\0';
- printf("%s\n", opts->term_osd_esc);
+ mp_msg(MSGT_CPLAYER, MSGL_STATUS, "%s\n", opts->term_osd_esc);
}
}