obs-ffmpeg: Treat errors as fatal for non-network streams in ffmpeg-mux

master
Eric Lindvall 2020-11-15 14:33:36 -08:00 committed by Jim
parent 315fbd6f33
commit 6071098abc
1 changed files with 1 additions and 5 deletions

View File

@ -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;
}