fixes warnings with Xcode 14.3 as in previous commit
+ allocate +1 in Log_output buffer - snprintf(MULL, 0...) returns number
of bytes without terminating '\0'. std::string storage isn't guaranteed
to be NULL-terminated (std::string("").at(0) throws an exception). The
buffer is somewhere preallocated 256 which prevents problem but it's
better not to rely upon it.
+ comment out some unused function in LDGM that also triggered the
warning but looked a bit suspicious so it was not clear how to fix
Needs adding log_msg_once variable arguments (printf-like).
+ print always error in deinterlace - if user explicitly wants
deinterlace PP, maybe we should notify loudly
On one-shot second and further calls of one-shot message, no output was
producet, yet empty buffer was submitted to Log_output resulting in
false repeate messages:
Last message repeated <n> times
To simplify the stuff, C++ API was removed and in the C API the Logger
is taken only if actual message will be output. If someone is willing to
use the C++ API, it can be later readded (not really needed now, only
simple message are presented).
Previously colored output using the inline TERM_* macros from color_out.h was
done only using the color_printf() function. Since there are now places
where they are used with log_msg(), we need to prune ansi codes here
too.
Removed indirect dependency on rang.hpp through color_out.h. Now only
remaining dependencies on rang.hpp are direct.
+ fixed escape sequence for foreground magenta
+ change first parameter of serialize callback to (const void *)
+ renamed "lavd-uncompressed" to "lavd-avframe" - uncompressed is vague
since there are multiple forms of uncompressed - avframe, ultragrid
pixfmt...
GCC 11 gives incorrect warning for unintialized strerror_buf on
strerror_buf.size(), which is, however, compile-time constant. As a
workaround a separate size constant is used.
Force color output if both stdout and stderr are connected to terminal.
The setting is global and it is possible that only stdout is redirected
(eg. to pager) while the check here was for clog (cerr) only. Thus
escape sequences had been unintentionally output to the pipe.