Commit 872e8a21 authored by Urs Fleisch's avatar Urs Fleisch
Browse files

Fixed bug: The wrong header info was displayed for some files with ID3v2 but...

Fixed bug: The wrong header info was displayed for some files with ID3v2 but without ID3v1. Check first ID3v2 header info, then ID3v1 header info.
parent f6b1aca6
......@@ -1116,12 +1116,12 @@ void Mp3File::getDetailInfo(DetailInfo& info) const
}
const Mp3_Headerinfo* headerInfo = 0;
if (m_tagV1) {
headerInfo = m_tagV1->GetMp3HeaderInfo();
}
if (!headerInfo && m_tagV2) {
if (m_tagV2) {
headerInfo = m_tagV2->GetMp3HeaderInfo();
}
if (!headerInfo && m_tagV1) {
headerInfo = m_tagV1->GetMp3HeaderInfo();
}
if (headerInfo) {
info.valid = true;
switch (headerInfo->version) {
......@@ -1192,12 +1192,12 @@ unsigned Mp3File::getDuration() const
{
unsigned duration = 0;
const Mp3_Headerinfo* info = NULL;
if (m_tagV1) {
info = m_tagV1->GetMp3HeaderInfo();
}
if (!info && m_tagV2) {
if (m_tagV2) {
info = m_tagV2->GetMp3HeaderInfo();
}
if (!info && m_tagV1) {
info = m_tagV1->GetMp3HeaderInfo();
}
if (info && info->time > 0) {
duration = info->time;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment