libobs: Do not allow reconnect if stop code is OBS_OUTPUT_INVALID_STREAM #11304
+3
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Stop attempting to reconnect if stop code was
OBS_OUTPUT_INVALID_STREAM
.Motivation and Context
If the stream key becomes invalid after a successful stream start and OBS gets disconnected it will get stuck in an indefinite loop trying to reconnect.
This issue has come up in relation to enhanced broadcasting on Twitch, which uses a signed stream key with a limited lifetime. For people running 24/7 streams OBS would get disconnected after the 48 hour limit, and subsequently attempt to (unsuccessfully) reconnect ad infinitum.
There probably is no scenario where a stream key is only temporarily rejected, so it should be fine to always give up on reconnecting once it expires. There will be some follow-up later (next week or so) to allow EB multitrack outputs to reconnect, which would require going through the entire flow as encoder settings may change when a new request is made, and simply fetching a new stream key is not possible.
How Has This Been Tested?
Locally.
Types of changes
Checklist: