mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-11-10 13:44:17 +00:00
Fix handling of line continuations in FFmpeg logs (for real this time)
This commit is contained in:
parent
d6ef8945f5
commit
2a610584ee
1 changed files with 6 additions and 1 deletions
|
@ -167,9 +167,14 @@ void ffmpegLogToDiskHandler(void* ptr, int level, const char* fmt, va_list vl)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We need to use the *previous* printPrefix value to determine whether to
|
||||||
|
// print the prefix this time. av_log_format_line() will set the printPrefix
|
||||||
|
// value to indicate whether the prefix should be printed *next time*.
|
||||||
|
bool shouldPrefixThisMessage = printPrefix != 0;
|
||||||
|
|
||||||
av_log_format_line(ptr, level, fmt, vl, lineBuffer, sizeof(lineBuffer), &printPrefix);
|
av_log_format_line(ptr, level, fmt, vl, lineBuffer, sizeof(lineBuffer), &printPrefix);
|
||||||
|
|
||||||
if (printPrefix) {
|
if (shouldPrefixThisMessage) {
|
||||||
QTime logTime = QTime::fromMSecsSinceStartOfDay(s_LoggerTime.elapsed());
|
QTime logTime = QTime::fromMSecsSinceStartOfDay(s_LoggerTime.elapsed());
|
||||||
QString txt = QString("%1 - FFmpeg: %2").arg(logTime.toString()).arg(lineBuffer);
|
QString txt = QString("%1 - FFmpeg: %2").arg(logTime.toString()).arg(lineBuffer);
|
||||||
logToLoggerStream(txt);
|
logToLoggerStream(txt);
|
||||||
|
|
Loading…
Reference in a new issue