File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,11 +83,11 @@ def initialize(message, output)
8383 when /\b asf_o\b / then '.asf'
8484 when /\b (mov|mp4)\b /
8585 case major_brand
86- when /\A qt\b /i then '.mov'
87- when /\A m4a\b /i then '.m4a'
88- when /\A m4v\b /i then '.m4v'
89- when /\A m4s\b /i then '.m4s'
90- else '.mp4'
86+ when nil , /\A qt\b /i then '.mov'
87+ when /\A m4a\b /i then '.m4a'
88+ when /\A m4v\b /i then '.m4v'
89+ when /\A m4s\b /i then '.m4s'
90+ else '.mp4'
9191 end
9292 when /\b matroska\b /
9393 if streams
Original file line number Diff line number Diff line change @@ -609,6 +609,16 @@ module FFMPEG
609609 end
610610 end
611611
612+ context 'when the media is an old-style QuickTime MOV without an ftyp box' do
613+ let ( :path ) { fixture_media_file ( 'rotated@0.mov' ) }
614+
615+ before { allow ( subject ) . to receive ( :major_brand ) . and_return ( nil ) }
616+
617+ it 'returns .mov' do
618+ expect ( subject . extname ) . to eq ( '.mov' )
619+ end
620+ end
621+
612622 context 'when the media is a WAV' do
613623 let ( :path ) { fixture_media_file ( 'hello.wav' ) }
614624
You can’t perform that action at this time.
0 commit comments