fix: handle last frame before APE/ID3 tags and M4A info display#56
Merged
fix: handle last frame before APE/ID3 tags and M4A info display#56
Conversation
…55) - Add find_audio_end() to detect trailing APE/ID3v1 tags - Update iterate_frames, apply_gain, apply_gain_channel, apply_gain_wrap to use audio_end boundary instead of file_size - This ensures last MP3 frame is correctly modified even when followed by metadata tags - Add M4A/AAC detection in process_info() to show appropriate format info instead of incorrectly analyzing as MP3 Fixes #54, Fixes #55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes two issues:
Issue #54: Last frame not modified when followed by APE/ID3 tag
Problem: When an MP3 file has metadata tags (APE or ID3v1) immediately following the last audio frame, mp3rgain was skipping the last frame during gain application.
Solution: Added
find_audio_end()function that detects trailing APE/ID3v1 tags and returns the actual end of audio data. Updated all frame iteration functions to use this boundary instead of file size.Changes:
find_audio_end()inlib.rsiterate_frames(),apply_gain(),apply_gain_channel(),apply_gain_wrap()to useaudio_endboundaryIssue #55: M4A/AAC files incorrectly show MP3 format info
Problem: Running
mp3rgain test.m4a(without -r or -a) showed incorrect MP3 format info.Solution: Added M4A/AAC detection in
process_info()to display appropriate format information.Before:
After:
Testing
Fixes #54
Fixes #55