"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Id3V2Stream.cpp" between
MP3Diags-unstable-1.3.04.tar.gz and MP3Diags-unstable-1.5.01.tar.gz

About: MP3 Diags finds problems in MP3 files and helps the user to fix many of them (with a GUI). Also includes a tag editor and a file renamer.

Id3V2Stream.cpp  (MP3Diags-unstable-1.3.04):Id3V2Stream.cpp  (MP3Diags-unstable-1.5.01)
skipping to change at line 552 skipping to change at line 552
in.seekg(m_frame.m_nDiskHdrSize, ios_base::cur); in.seekg(m_frame.m_nDiskHdrSize, ios_base::cur);
streampos posNext (m_frame.m_pos); streampos posNext (m_frame.m_pos);
posNext += m_frame.m_nDiskDataSize + m_frame.m_nDiskHdrSize; posNext += m_frame.m_nDiskDataSize + m_frame.m_nDiskHdrSize;
int nContentBytesSkipped (0); int nContentBytesSkipped (0);
int nRead (0); int nRead (0);
in.seekg(nDiscard, ios_base::cur); in.seekg(nDiscard, ios_base::cur);
nRead = readID3V2(m_frame.m_bHasUnsynch, in, &m_vcOwnData[0], cSize(m_vc OwnData), posNext, nContentBytesSkipped); nRead = readID3V2(m_frame.m_bHasUnsynch, in, &m_vcOwnData[0], cSize(m_vc OwnData), posNext, nContentBytesSkipped);
//qDebug("nRead %d ; m_frame.m_nMemDataSize %d ; nContentBytesSkipped %d ", nRead, m_frame.m_nMemDataSize, nContentBytesSkipped); //qDebug("nRead %d ; m_frame.m_nMemDataSize %d ; nContentBytesSkipped %d ", nRead, m_frame.m_nMemDataSize, nContentBytesSkipped);
if (cSize(m_vcOwnData) != nRead) if (cSize(m_vcOwnData) != nRead)
{ {
CB_THROW(LoadFailure); CB_THROW(LoadFailure); // triggered on 2017.01.12 in XP, but there w ere no files on the disk (was a user's data, with logs turned off)
} }
m_pData = &m_vcOwnData[0]; m_pData = &m_vcOwnData[0];
} }
else else
{ {
if (frame.m_vcData.empty()) if (frame.m_vcData.empty())
{ {
static char c (0); static char c (0);
m_pData = &c; m_pData = &c;
skipping to change at line 970 skipping to change at line 970
if (img.loadFromData(pBinData, nSize)) if (img.loadFromData(pBinData, nSize))
{ {
pFrame->m_nImgSize = nSize; pFrame->m_nImgSize = nSize;
pFrame->m_nImgOffset = pImgData - pFrameData; pFrame->m_nImgOffset = pImgData - pFrameData;
pFrame->m_eApicStatus = pFrame->m_nPictureType == Id3V2Frame::PT_COVER ? Id3V2Frame::COVER : Id3V2Frame::NON_COVER; pFrame->m_eApicStatus = pFrame->m_nPictureType == Id3V2Frame::PT_COVER ? Id3V2Frame::COVER : Id3V2Frame::NON_COVER;
pFrame->m_nWidth = short(img.width()); pFrame->m_nWidth = short(img.width());
pFrame->m_nHeight = short(img.height()); pFrame->m_nHeight = short(img.height());
if (0 == strcmp("image/jpeg", szMimeType) || 0 == strcmp("image/jpg", sz MimeType)) if (0 == strcmp("image/jpeg", szMimeType) || 0 == strcmp("image/jpg", sz MimeType))
{ {
pFrame->m_eCompr = ImageInfo::JPG; pFrame->m_eCompr = ImageInfo::JPG;
const unsigned char* p (pBinData);
for (int i = 0; i < nSize - 1; i++)
{
unsigned char c1 (*(p + i));
if (c1 != 0xff)
{
continue;
}
unsigned char c2 (*(p + i + 1));
if (c2 == 0xc0)
{
// baseline (i.e. non-progressive)
break;
}
if (c2 == 0xc2)
{
// progressive
MP3_NOTE (pFrame->m_pos, id3v2ProgressiveJpeg);
break;
}
}
} }
else if (0 == strcmp("image/png", szMimeType)) else if (0 == strcmp("image/png", szMimeType))
{ {
pFrame->m_eCompr = ImageInfo::PNG; pFrame->m_eCompr = ImageInfo::PNG;
} }
else else
{ {
pFrame->m_eCompr = ImageInfo::INVALID; pFrame->m_eCompr = ImageInfo::INVALID;
} //ttt2 perhaps support GIF or other formats; (well, GIFs can be loaded , but are recompressed when saving) } //ttt2 perhaps support GIF or other formats; (well, GIFs can be loaded , but are recompressed when saving)
return; return;
 End of changes. 2 change blocks. 
1 lines changed or deleted 22 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)