-
Notifications
You must be signed in to change notification settings - Fork 468
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MP3: Use
bytes
field from VBRI
frame instead of deriving from ToC
The previous code assumed that the `VBRI` Table of Contents (ToC) covers all the MP3 data in the file. In a file with an invalid VBRI ToC where this isn't the case, this results in playback silently stopping mid-playback (and either advancing to the next item, or continuing to count up the playback clock forever). This change considers the `bytes` field to determine the end of the MP3 data, in addition to deriving it from the ToC. If they disagree we log a warning and take the max value. This is because we handle accidentally reading non-MP3 data at the end (or hitting EoF) better than stopping reading valid MP3 data partway through. Issue: #1904 #cherrypick PiperOrigin-RevId: 700319250 (cherry picked from commit 46578ee)
- Loading branch information
1 parent
989c8f4
commit f91d520
Showing
11 changed files
with
3,418 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.