summaryrefslogtreecommitdiffstats
path: root/mp_msg.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-08-31 13:44:03 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-08-31 13:44:03 +0000
commit90be7cf00c475fdc699a14c9d87ef314349bf0b3 (patch)
tree92777ae10ef9c02b4809f0d253c8678284c26edb /mp_msg.c
parentbf8fb7478f0064608ddd67308bd8681286ab9ad8 (diff)
downloadmpv-90be7cf00c475fdc699a14c9d87ef314349bf0b3.tar.bz2
mpv-90be7cf00c475fdc699a14c9d87ef314349bf0b3.tar.xz
print only fatal/error/warning to stderr, others go to stdout
(actually reversed Nick's r1.10 commit) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7196 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mp_msg.c')
-rw-r--r--mp_msg.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/mp_msg.c b/mp_msg.c
index b5c7c3df91..ab316f92af 100644
--- a/mp_msg.c
+++ b/mp_msg.c
@@ -53,6 +53,7 @@ void mp_msg_c( int x, const char *format, ... ){
if((x&255)>mp_msg_levels[x>>8]) return; // do not display
va_start(va, format);
vsnprintf(tmp, MSGSIZE_MAX, mp_gettext(format), va);
+ va_end(va);
tmp[MSGSIZE_MAX-1] = 0;
#if defined(HAVE_NEW_GUI) && !defined(FOR_MENCODER)
@@ -73,13 +74,11 @@ void mp_msg_c( int x, const char *format, ... ){
}
#endif
- fprintf(stderr, "%s", tmp);
- if ((x & 255) <= MSGL_ERR)
- fflush(stderr);
- else
- fflush(stdout);
-
- va_end(va);
+ if ((x & 255) <= MSGL_WARN){
+ fprintf(stderr, "%s", tmp);fflush(stderr);
+ } else {
+ printf("%s", tmp);fflush(stdout);
+ }
#else
va_list va;
if((x&255)>mp_msg_levels[x>>8]) return; // do not display