From ece4d1e90ea1d2b7555e4708a186497ceceb15a3 Mon Sep 17 00:00:00 2001 From: pkv Date: Wed, 23 Nov 2022 23:04:09 +0100 Subject: [PATCH] obs-ffmpeg: Allow srt stream to disconnect after timeout Fixes #7848 Currently OBS_OUTPUT_INVALID_STREAM is emitted when a wrong password is used. This commit expands the signal emission to case of timeouts. Signed-off-by: pkv --- plugins/obs-ffmpeg/obs-ffmpeg-srt.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/obs-ffmpeg/obs-ffmpeg-srt.h b/plugins/obs-ffmpeg/obs-ffmpeg-srt.h index 416476173..2046d56c6 100644 --- a/plugins/obs-ffmpeg/obs-ffmpeg-srt.h +++ b/plugins/obs-ffmpeg/obs-ffmpeg-srt.h @@ -155,9 +155,10 @@ static int libsrt_network_wait_fd(URLContext *h, int eid, int write) /* Socket reported in wsock AND rsock signifies an error. */ int reason = srt_getrejectreason(*ready); - if (reason == SRT_REJ_BADSECRET || reason == SRT_REJ_UNSECURE) { + if (reason == SRT_REJ_BADSECRET || reason == SRT_REJ_UNSECURE || + reason == SRT_REJ_TIMEOUT) { blog(LOG_ERROR, - "[obs-ffmpeg mpegts muxer / libsrt]: Connection rejected, wrong password"); + "[obs-ffmpeg mpegts muxer / libsrt]: Connection rejected, wrong password or invalid URL"); return OBS_OUTPUT_INVALID_STREAM; } else { blog(LOG_ERROR,