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.
While analyzing warnings in new php versions, I found erroneous behavior in my opinion.
According to this part:
getID3/getid3/module.audio.mp3.php
Lines 916 to 926 in a99e0a2
The
self::ClosestStandardMP3Bitrate
method will be called, which is passed the$thisfile_mpeg_audio['bitrate']
argument. In the case when$thisfile_mpeg_audio['bitrate']
is equal tofree
then methodself::ClosestStandardMP3Bitrate
will return-
and this value will be written to$info['audio']['bitrate']
and$thisfile_mpeg_audio['bitrate']
.By additional checking that the bitrate is not equal to
free
, we prevent writing to$info['audio']['bitrate']
an incorrect value-
, since the correctly calculated bitrate is already there.Could you please confirm my guesses?
Sample (and some others in mp3/freeformat): https://github.com/JamesHeinrich/getID3-testfiles/raw/master/mp3/freeformat/3903d-freeformat384.mp3