浏览代码

obs-ffmpeg: Treat non-network errors as fatal too

4f873376 as part of PR #3460 changed ffmpeg_mux_packet to
fail = !ffmpeg_mux_packet. ffe4c855 only reverted that one line
instead of the entire previous commit. When the change was
reintroduced in 6071098a as part of PR #3740, it became
fail = ffmpeg_mux_packet without the negation.

This commit reverts db1e6aa and fixes the logic check.
Richard Stanway 5 年之前
父节点
当前提交
17b3873578
共有 1 个文件被更改,包括 1 次插入5 次删除
  1. 1 5
      plugins/obs-ffmpeg/ffmpeg-mux/ffmpeg-mux.c

+ 1 - 5
plugins/obs-ffmpeg/ffmpeg-mux/ffmpeg-mux.c

@@ -857,15 +857,11 @@ int main(int argc, char *argv[])
 		return ret;
 	}
 
-	bool is_network = ffmpeg_mux_is_network(&ffm);
-
 	while (!fail && safe_read(&info, sizeof(info)) == sizeof(info)) {
 		resize_buf_resize(&rb, info.size);
 
 		if (safe_read(rb.buf, info.size) == info.size) {
-			bool packet_fail =
-				ffmpeg_mux_packet(&ffm, rb.buf, &info);
-			fail = is_network && packet_fail;
+			fail = !ffmpeg_mux_packet(&ffm, rb.buf, &info);
 		} else {
 			fail = true;
 		}