mirror of
https://github.com/beetbox/beets.git
synced 2025-12-29 12:02:44 +01:00
bitrate for AAC files falls back to estimation
Apparently, info.bitrate can be zero for AAC files when the information is not available in the header. MediaFile now falls back to estimation when this is true.
This commit is contained in:
parent
7522468f0e
commit
72659975a2
2 changed files with 3 additions and 1 deletions
|
|
@ -985,7 +985,7 @@ class MediaFile(object):
|
|||
imprecision is possible because the file header is incorporated
|
||||
in the file size.
|
||||
"""
|
||||
if hasattr(self.mgfile.info, 'bitrate'):
|
||||
if hasattr(self.mgfile.info, 'bitrate') and self.mgfile.info.bitrate:
|
||||
# Many formats provide it explicitly.
|
||||
return self.mgfile.info.bitrate
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ Changelog
|
|||
"OR" (upper case).
|
||||
* Fix an error in the ``rewrite`` and ``inline`` plugins when the corresponding
|
||||
config sections did not exist.
|
||||
* Fix bitrate estimation for AAC files whose headers are missing the relevant
|
||||
data.
|
||||
|
||||
1.0b12 (January 16, 2012)
|
||||
-------------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue