Skip to content

Commit

Permalink
obs-ffmpeg: Fix deadlock on shutting down muxer
Browse files Browse the repository at this point in the history
  • Loading branch information
exeldro authored and RytoEX committed Oct 7, 2024
1 parent 2aedaae commit 9e7b51a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/obs-ffmpeg/ffmpeg-mux/ffmpeg-mux.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,10 +686,10 @@ static void *ffmpeg_mux_io_thread(void *data)

// Loop to write in chunk_size chunks
for (;;) {
shutting_down = os_atomic_load_bool(&ffm->io.shutdown_requested);

pthread_mutex_lock(&ffm->io.data_mutex);

shutting_down = os_atomic_load_bool(&ffm->io.shutdown_requested);

// Fetch as many writes as possible from the deque
// and fill up our local chunk. This may involve seeking
// if ffmpeg needs to, so take care of that as well.
Expand Down

0 comments on commit 9e7b51a

Please sign in to comment.