[FFmpeg-cvslog] avutil/log: skip IO calls on empty strings

Michael Niedermayer git at videolan.org
Sat Mar 8 16:48:15 CET 2014


ffmpeg | branch: release/1.0 | Michael Niedermayer <michaelni at gmx.at> | Fri Dec  6 23:30:34 2013 +0100| [584e15d64395713c866849aa9097c7d93b34cfca] | committer: Michael Niedermayer

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 at gmx.at>
(cherry picked from commit a044a183a3fb90b20a8deaa3ea1158510bcdd420)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=584e15d64395713c866849aa9097c7d93b34cfca
---

 libavutil/log.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavutil/log.c b/libavutil/log.c
index 90a46b0..f7873a3 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;



More information about the ffmpeg-cvslog mailing list