obs-ffmpeg: Handle mux errors when writing replay buffer

Without this, we could continuously call signal_failure in write_packet,
crashing OBS with a stack overflow with all the error callbacks.
This commit is contained in:
Richard Stanway
2023-04-01 16:21:37 -07:00
committed by Jim
parent c8d274edac
commit 0f614034ca
+6 -1
View File
@@ -1176,7 +1176,12 @@ static void *replay_buffer_mux_thread(void *data)
for (size_t i = 0; i < stream->mux_packets.num; i++) {
struct encoder_packet *pkt = &stream->mux_packets.array[i];
write_packet(stream, pkt);
if (!write_packet(stream, pkt)) {
warn("Could not write packet for file '%s'",
stream->path.array);
error = true;
goto error;
}
obs_encoder_packet_release(pkt);
}