From 17b38735786f019cea64b03ed0659fcefa16ebaf Mon Sep 17 00:00:00 2001 From: Richard Stanway Date: Thu, 19 Nov 2020 01:11:45 +0100 Subject: [PATCH] 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. --- plugins/obs-ffmpeg/ffmpeg-mux/ffmpeg-mux.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/plugins/obs-ffmpeg/ffmpeg-mux/ffmpeg-mux.c b/plugins/obs-ffmpeg/ffmpeg-mux/ffmpeg-mux.c index 3bceb98f5..debe64640 100644 --- a/plugins/obs-ffmpeg/ffmpeg-mux/ffmpeg-mux.c +++ b/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; }