mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-24 02:34:23 -05:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user