Verify shared stream mixing and avoid retrying terminal closures
This commit is contained in:
1 parent
4a44149c00
commit
b3116173ca
2 files changed
+57
-3
No files matched your search
@@ -242,8 +242,8 @@ void StreamPlayerWindow::decode() {
|
||||
if (request && !gui_stream_resync(p.id)) DEBUG_WARN(DEBUG_CATEGORY_STREAM, "desktop playback resync refused");
|
||||
deadline = nowUs() + 10000000; emit statusChanged(text("Waiting for a key frame…"));
|
||||
};
|
||||
auto fail = [&](const QString& reason) {
|
||||
p.failed = p.complete = true;
|
||||
auto fail = [&](const QString& reason, bool retry = true) {
|
||||
p.failed = retry; p.complete = true;
|
||||
DEBUG_ERROR(DEBUG_CATEGORY_STREAM, "desktop viewer failed id=%llu: %s", (unsigned long long)p.id, qPrintable(reason));
|
||||
emit statusChanged(reason);
|
||||
};
|
||||
@@ -389,7 +389,7 @@ void StreamPlayerWindow::decode() {
|
||||
: record.reason == STREAM_CLOSE_MEMBER ? "The source is no longer a channel member"
|
||||
: record.reason == STREAM_CLOSE_SERVICE ? "Chat service is stopped"
|
||||
: record.reason == STREAM_CLOSE_GROUP ? "The channel is closed" : "Could not continue the stream";
|
||||
fail(text(reason)); break;
|
||||
fail(text(reason), record.reason == STREAM_CLOSE_FAILED); break;
|
||||
}
|
||||
if (record.kind == StreamRecordKind::End) {
|
||||
std::lock_guard<std::mutex> guard(p.lock); p.ended = true; p.holdAudio = false;
|
||||
|
||||
Reference in new issue
Block a user