ALT Linux repos
S: | 1.5-alt1.38416.2 |
D: | 1.0-alt35.27330.1 |
5.0: | 1.0-alt35.27654.3 |
4.1: | 1.0-alt35.26470.1 |
4.0: | 1.0-alt35.23722.M40.1 |
Group :: Video
RPM: mplayer
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: 0021-fix-usage-mp_msg.patch
Download
Download
From 06ca0aa2a722f7226f7c5bdd90a0e9735952375c Mon Sep 17 00:00:00 2001
From: Led <led@altlinux.org>
Date: Thu, 30 May 2013 10:30:51 +0300
Subject: [PATCH] fix usage mp_msg()
---
MPlayer/m_option.c | 4 ++--
MPlayer/mp_msg.c | 10 +++++-----
MPlayer/mplayer.c | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/MPlayer/m_option.c b/MPlayer/m_option.c
index fecefabc31..f623bc2196 100644
--- a/MPlayer/m_option.c
+++ b/MPlayer/m_option.c
@@ -902,11 +902,11 @@ const m_option_type_t m_option_type_func = {
static int parse_print(const m_option_t* opt,const char *name, const char *param, void* dst, int src) {
if(opt->type == CONF_TYPE_PRINT_INDIRECT)
- mp_msg(MSGT_CFGPARSER, MSGL_INFO, "%s", *(char **) opt->p);
+ mp_msg(MSGT_CFGPARSER, MSGL_INFO, *(char **) opt->p);
else if(opt->type == CONF_TYPE_PRINT_FUNC)
return ((m_opt_func_full_t) opt->p)(opt,name,param);
else
- mp_msg(MSGT_CFGPARSER, MSGL_INFO, "%s", (char *) opt->p);
+ mp_msg(MSGT_CFGPARSER, MSGL_INFO, (const char *) opt->p);
if(opt->priv == NULL)
return M_OPT_EXIT;
diff --git a/MPlayer/mp_msg.c b/MPlayer/mp_msg.c
index 67bcc067d3..f11813e591 100644
--- a/MPlayer/mp_msg.c
+++ b/MPlayer/mp_msg.c
@@ -191,8 +191,8 @@ static void print_msg_module(FILE* stream, int mod)
fprintf(stream, "\033[%d;3%dm", c2 >> 3, c2 & 7);
fprintf(stream, "%9s", module_text[mod]);
if (mp_msg_color)
- fprintf(stream, "\033[0;37m");
- fprintf(stream, ": ");
+ fputs("\033[0;37m", stream);
+ fputs(": ", stream);
}
void mp_msg(int mod, int lev, const char *format, ... ){
@@ -248,7 +248,7 @@ void mp_msg_va(int mod, int lev, const char *format, va_list va){
// as a status line normally is intended to be overwitten by next status line
// output a '\n' to get a normal message on a separate line
- if (statusline && lev != MSGL_STATUS) fprintf(stream, "\n");
+ if (statusline && lev != MSGL_STATUS) fputc('\n', stream);
statusline = lev == MSGL_STATUS;
if (header)
@@ -257,8 +257,8 @@ void mp_msg_va(int mod, int lev, const char *format, va_list va){
len = strlen(tmp);
header = len && (tmp[len-1] == '\n' || tmp[len-1] == '\r');
- fprintf(stream, "%s", tmp);
+ fputs(tmp, stream);
if (mp_msg_color)
- fprintf(stream, "\033[0m");
+ fputs("\033[0m", stream);
fflush(stream);
}
diff --git a/MPlayer/mplayer.c b/MPlayer/mplayer.c
index b4411cef2f..88630108b1 100644
--- a/MPlayer/mplayer.c
+++ b/MPlayer/mplayer.c
@@ -3639,7 +3639,7 @@ goto_enable_cache:
if (playing_msg) {
char *msg = property_expand_string(mpctx, playing_msg);
- mp_msg(MSGT_CPLAYER, MSGL_INFO, "%s", msg);
+ mp_msg(MSGT_CPLAYER, MSGL_INFO, msg);
free(msg);
}
--
2.33.7