Skip to content

Commit

Permalink
Make sure we wait for ffmpeg to finish (#650)
Browse files Browse the repository at this point in the history
  • Loading branch information
robbevp authored Oct 9, 2024
1 parent 79765f3 commit 7e7f8d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/models/audio_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ def convert(codec_conversion, out_file_name)
'-map', 'a',
out_file_name,
err: [Rails.configuration.ffmpeg_log_location, 'a']
)
) do |_stdin, _stdout, _wait_thr|
# We call `Open3.popen2` with an empty block, so the process finishes before we return
# This returns `Process::Status`
end
end

def full_path
Expand Down

0 comments on commit 7e7f8d2

Please sign in to comment.