提交 17b38735 编写于 作者: R Richard Stanway

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 db1e6aa1 and fixes the logic check.
上级 db1e6aa1
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册