فهرست منبع

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 <[email protected]>
pkv 2 سال پیش
والد
کامیت
ece4d1e90e
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      plugins/obs-ffmpeg/obs-ffmpeg-srt.h

+ 3 - 2
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,