From 6de49420a508a67e98f1034a21a73e7dbb812629 Mon Sep 17 00:00:00 2001 From: Julian Rother <julianr@fsmpi.rwth-aachen.de> Date: Thu, 4 Jan 2018 18:31:29 +0100 Subject: [PATCH] Made the logbuffer stream publicly available to allow non-av writes --- util.h | 1 + util/avlogbuf.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/util.h b/util.h index fef2e13..2ecf5a6 100644 --- a/util.h +++ b/util.h @@ -32,6 +32,7 @@ void parse_dict(AVDictionary **d, char *s); void parse_chapters(AVFormatContext *ctx, char *s, int64_t duration); /* Logging */ +extern FILE *logstream; void init_avlogbuf(void); void avlogbuf_callback(void *classp, int level, const char *fmt, va_list ap); char *get_avlogbuf(void); diff --git a/util/avlogbuf.c b/util/avlogbuf.c index 2d34f99..4116bf8 100644 --- a/util/avlogbuf.c +++ b/util/avlogbuf.c @@ -3,9 +3,9 @@ #include "../util.h" +FILE *logstream; static char *logbuffer; static size_t logsize; -static FILE *logstream; static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; static char prevbuf[200] = ""; static int repeats = 0; -- GitLab