Skip to content

Commit 6f5a581

Browse files
committed
frontend: Add reconnect callback for multitrack video
1 parent 8457269 commit 6f5a581

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

frontend/utility/MultitrackVideoOutput.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,12 @@ void MultitrackVideoOutput::PrepareStreaming(QWidget *parent, const char *servic
394394
// Register the BPM (Broadcast Performance Metrics) callback
395395
obs_output_add_packet_callback(output, bpm_inject, NULL);
396396

397+
// Set callback to prevent reconnection attempts once the stream key has become invalid
398+
static auto reconnect_cb = [](void *, obs_output_t *, int code) -> bool {
399+
return code != OBS_OUTPUT_INVALID_STREAM;
400+
};
401+
obs_output_set_reconnect_callback(output, reconnect_cb, nullptr);
402+
397403
OBSSignal start_streaming;
398404
OBSSignal stop_streaming;
399405
SetupSignalHandlers(false, this, output, start_streaming, stop_streaming);

0 commit comments

Comments
 (0)