From a044a183a3fb90b20a8deaa3ea1158510bcdd420 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Fri, 6 Dec 2013 23:30:34 +0100
Subject: [PATCH] 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>
---
 libavutil/log.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavutil/log.c b/libavutil/log.c
index 0eb09b213d0..a7eb34c3d25 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -103,6 +103,9 @@ static int use_color = -1;
 
 static void colored_fputs(int level, const char *str)
 {
+    if (!*str)
+        return;
+
     if (use_color < 0) {
 #if HAVE_SETCONSOLETEXTATTRIBUTE
         CONSOLE_SCREEN_BUFFER_INFO con_info;
-- 
GitLab