diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-06 23:30:34 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-08 16:25:20 +0100 |
commit | 584e15d64395713c866849aa9097c7d93b34cfca (patch) | |
tree | d0cc4dc345cb2c8c94737b9fbef44276a475bfac | |
parent | 855fe6544792cc11c159119ce93434f2ad40dfa0 (diff) | |
download | ffmpeg-584e15d64395713c866849aa9097c7d93b34cfca.tar.gz |
avutil/log: skip IO calls on empty strings
These occur when no context is set for example, thus they are common
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a044a183a3fb90b20a8deaa3ea1158510bcdd420)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavutil/log.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavutil/log.c b/libavutil/log.c index 90a46b0650..f7873a3039 100644 --- a/libavutil/log.c +++ b/libavutil/log.c @@ -100,6 +100,9 @@ static int use_color = -1; #undef fprintf static void colored_fputs(int level, const char *str) { + if (!*str) + return; + if (use_color < 0) { #if defined(_WIN32) && !defined(__MINGW32CE__) CONSOLE_SCREEN_BUFFER_INFO con_info; |