diff --git a/lib/ffmpeg/transcoder.rb b/lib/ffmpeg/transcoder.rb index 57ac7a3..d5c1422 100644 --- a/lib/ffmpeg/transcoder.rb +++ b/lib/ffmpeg/transcoder.rb @@ -17,7 +17,7 @@ class << self def initialize( input, output_path, - options = EncodingOptions.new, + options, validate: true, preserve_aspect_ratio: true, input_options: [] diff --git a/spec/ffmpeg/transcoder_spec.rb b/spec/ffmpeg/transcoder_spec.rb index 863077b..606a095 100644 --- a/spec/ffmpeg/transcoder_spec.rb +++ b/spec/ffmpeg/transcoder_spec.rb @@ -42,15 +42,11 @@ module FFMPEG let(:input) { media } let(:output_ext) { 'mp4' } let(:output_path) { tmp_file(ext: output_ext) } - let(:options) { nil } + let(:options) { EncodingOptions.new } let(:kwargs) { nil } subject do - if options.nil? && kwargs.nil? - described_class.new(input, output_path) - elsif options.nil? - described_class.new(input, output_path, **kwargs) - elsif kwargs.nil? + if kwargs.nil? described_class.new(input, output_path, options) else described_class.new(input, output_path, options, **kwargs)