2
0

Fixed crash when supplying FFMPEG_BINARY environment variable (#30022)

This commit is contained in:
Tim Rogers
2024-04-22 04:00:24 -05:00
committed by GitHub
parent 75163d9daf
commit 1ca6ff8ca5
4 changed files with 6 additions and 5 deletions

View File

@@ -35,7 +35,7 @@ module Paperclip
dst.binmode
begin
command = Terrapin::CommandLine.new('ffmpeg', '-i :source -loglevel :loglevel -y :destination', logger: Paperclip.logger)
command = Terrapin::CommandLine.new(Rails.configuration.x.ffmpeg_binary, '-i :source -loglevel :loglevel -y :destination', logger: Paperclip.logger)
command.run(source: @file.path, destination: dst.path, loglevel: 'fatal')
rescue Terrapin::ExitStatusError
dst.close(true)