weston: sync vidda patch(44-48) [2/2]
PD#SWPL-172524
Problem:
frame lost when video play
Solution:
sync vidda patch
Verify:
t5w
Change-Id: I5769c9cb31f968c49f08650c0c8592dbcbc56595
Signed-off-by: limin.tian <limin.tian@amlogic.com>
diff --git a/libweston/log.c b/libweston/log.c
index 911feae..8e0838e 100644
--- a/libweston/log.c
+++ b/libweston/log.c
@@ -36,6 +36,7 @@
#include <libweston/libweston.h>
#include "weston-log-internal.h"
+#include "aml-weston/aml-util.h"
/**
* \defgroup wlog weston-logging
@@ -90,9 +91,14 @@
*
* \ingroup wlog
*/
+
+static bool disable_log = false;
+
WL_EXPORT void
weston_log_set_handler(log_func_t log, log_func_t cont)
{
+ disable_log = disable_all_log();
+
log_handler = log;
log_continue_handler = cont;
}
@@ -119,6 +125,9 @@
WL_EXPORT int
weston_log(const char *fmt, ...)
{
+ if (disable_log) {
+ return 0;
+ }
int l;
va_list argp;