* Try harder to deduce a reasonable bitrate from certain AAC files.
This commit is contained in:
parent
9efb145aea
commit
e24e164d20
@ -253,6 +253,7 @@ _get_aacfileinfo(char *file, struct song_metadata *psong)
|
||||
aac_object_type_t profile_id = 0;
|
||||
|
||||
psong->vbr_scale = -1;
|
||||
psong->channels = 2; // A "normal" default in case we can't find this information
|
||||
|
||||
if(!(infile = fopen(file, "rb")))
|
||||
{
|
||||
@ -334,6 +335,11 @@ _get_aacfileinfo(char *file, struct song_metadata *psong)
|
||||
{
|
||||
psong->bitrate = atom_length * 1000 / psong->song_length / 128;
|
||||
}
|
||||
/* If this is an obviously wrong bitrate, try something different */
|
||||
if((psong->bitrate < 16000) && (psong->song_length))
|
||||
{
|
||||
psong->bitrate = (file_size * 8) / (psong->song_length / 1000);
|
||||
}
|
||||
}
|
||||
|
||||
//DPRINTF(E_DEBUG, L_METADATA, "Profile ID: %u\n", profile_id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user