about summary refs log tree commit diff
path: root/lib/paperclip/video_transcoder.rb
diff options
context:
space:
mode:
authorReverite <github@reverite.sh>2019-10-05 12:13:22 -0700
committerReverite <github@reverite.sh>2019-10-05 12:13:22 -0700
commit46ada47e09af0da9c776ef83c0ff034c720a83d6 (patch)
tree54fd4b1d5fba6d592f328955ef5968608bbe716f /lib/paperclip/video_transcoder.rb
parent333b5e25f0a615a9518d402ef10dceb70190a52f (diff)
parent3921125e5578fb3871fdcae0e8e8a77179f1ad72 (diff)
Merge branch 'glitch' into production
Diffstat (limited to 'lib/paperclip/video_transcoder.rb')
-rw-r--r--lib/paperclip/video_transcoder.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/paperclip/video_transcoder.rb b/lib/paperclip/video_transcoder.rb
index c3504c17c..66f7feda5 100644
--- a/lib/paperclip/video_transcoder.rb
+++ b/lib/paperclip/video_transcoder.rb
@@ -6,7 +6,9 @@ module Paperclip
   class VideoTranscoder < Paperclip::Processor
     def make
       meta = ::Av.cli.identify(@file.path)
+
       attachment.instance.type = MediaAttachment.types[:gifv] unless meta[:audio_encode]
+      options[:format] = File.extname(attachment.instance.file_file_name)[1..-1] if options[:keep_same_format]
 
       Paperclip::Transcoder.make(file, options, attachment)
     end