diff --git a/CHANGELOG b/CHANGELOG index b0e9e13..4f228f5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +== 8.4.2 2026-04-01 + +Fixes: +* Correctly detect the file extension for old-style MOV files (no ftyp box). + == 8.4.1 2026-04-01 Fixes: diff --git a/lib/ffmpeg/media.rb b/lib/ffmpeg/media.rb index b6007b6..2ee8bfe 100644 --- a/lib/ffmpeg/media.rb +++ b/lib/ffmpeg/media.rb @@ -83,11 +83,11 @@ def initialize(message, output) when /\basf_o\b/ then '.asf' when /\b(mov|mp4)\b/ case major_brand - when /\Aqt\b/i then '.mov' - when /\Am4a\b/i then '.m4a' - when /\Am4v\b/i then '.m4v' - when /\Am4s\b/i then '.m4s' - else '.mp4' + when nil, /\Aqt\b/i then '.mov' + when /\Am4a\b/i then '.m4a' + when /\Am4v\b/i then '.m4v' + when /\Am4s\b/i then '.m4s' + else '.mp4' end when /\bmatroska\b/ if streams diff --git a/lib/ffmpeg/version.rb b/lib/ffmpeg/version.rb index fe0c61e..1244a32 100644 --- a/lib/ffmpeg/version.rb +++ b/lib/ffmpeg/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module FFMPEG - VERSION = '8.4.1' + VERSION = '8.4.2' end diff --git a/spec/ffmpeg/media_spec.rb b/spec/ffmpeg/media_spec.rb index dc97229..72dab29 100644 --- a/spec/ffmpeg/media_spec.rb +++ b/spec/ffmpeg/media_spec.rb @@ -609,6 +609,16 @@ module FFMPEG end end + context 'when the media is an old-style QuickTime MOV without an ftyp box' do + let(:path) { fixture_media_file('rotated@0.mov') } + + before { allow(subject).to receive(:major_brand).and_return(nil) } + + it 'returns .mov' do + expect(subject.extname).to eq('.mov') + end + end + context 'when the media is a WAV' do let(:path) { fixture_media_file('hello.wav') }