浏览代码

obs-ffmpeg: Change OBS-OUTPUT-XXX returns for RIST protocol

This updates a few OBS-OUTPUT-XXX to better reflect the output failures
for the RIST protocol.
Signed-off-by: pkv <[email protected]>
pkv 5 月之前
父节点
当前提交
1407398e7f
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      plugins/obs-ffmpeg/obs-ffmpeg-rist.h

+ 3 - 3
plugins/obs-ffmpeg/obs-ffmpeg-rist.h

@@ -159,7 +159,7 @@ static int librist_open(URLContext *h, const char *uri)
 	ret = rist_logging_set(&logging_settings, s->log_level, log_cb, h, NULL, NULL);
 	if (ret < 0) {
 		blog(LOG_ERROR, "[obs-ffmpeg mpegts muxer / librist]: Failed to initialize logging settings");
-		return OBS_OUTPUT_CONNECT_FAILED;
+		return OBS_OUTPUT_ERROR;
 	}
 
 	blog(LOG_INFO, "[obs-ffmpeg mpegts muxer / librist]: libRIST version: %s, API: %s", librist_version(),
@@ -187,7 +187,7 @@ static int librist_open(URLContext *h, const char *uri)
 	if (ret < 0) {
 		blog(LOG_ERROR, "[obs-ffmpeg mpegts muxer / librist]: Failed to parse url: %s", uri);
 		librist_close(h);
-		return OBS_OUTPUT_INVALID_STREAM;
+		return OBS_OUTPUT_BAD_PATH;
 	}
 
 	if (((s->encryption == 128 || s->encryption == 256) && !s->secret) ||
@@ -230,7 +230,7 @@ static int librist_open(URLContext *h, const char *uri)
 err:
 	librist_close(h);
 
-	return OBS_OUTPUT_CONNECT_FAILED;
+	return OBS_OUTPUT_ERROR;
 }
 
 static int librist_write(URLContext *h, const uint8_t *buf, int size)