From 02ac14e790ad940ef518156b5f50a3f64bf07365 Mon Sep 17 00:00:00 2001 From: bernardwiesner Date: Tue, 2 Jun 2026 14:13:43 +0900 Subject: [PATCH] MP3: detect headerless VBR after parsing finishes --- Source/MediaInfo/Audio/File_Mpega.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/MediaInfo/Audio/File_Mpega.cpp b/Source/MediaInfo/Audio/File_Mpega.cpp index ec552a9d33..d22810e095 100644 --- a/Source/MediaInfo/Audio/File_Mpega.cpp +++ b/Source/MediaInfo/Audio/File_Mpega.cpp @@ -458,6 +458,14 @@ void File_Mpega::Streams_Finish() } } + //VBR detection without header + //BitRate_Count may have changed after Streams_Fill() sampled the first frames. + if (VBR_Frames==0) + { + if (BitRate_Count.size()>1) + BitRate_Mode=__T("VBR"); + } + //Bitrate calculation if VBR int64u FrameCount=0; if (VBR_Frames>0)