mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
MP4: Hide an internal function from the public header.
This commit is contained in:
parent
7f0c547ba6
commit
34ab65aa57
@ -32,6 +32,23 @@
|
||||
|
||||
using namespace TagLib;
|
||||
|
||||
namespace
|
||||
{
|
||||
bool checkValid(const MP4::AtomList &list)
|
||||
{
|
||||
for(MP4::AtomList::ConstIterator it = list.begin(); it != list.end(); ++it) {
|
||||
|
||||
if((*it)->length == 0)
|
||||
return false;
|
||||
|
||||
if(!checkValid((*it)->children))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
class MP4::File::FilePrivate
|
||||
{
|
||||
public:
|
||||
@ -47,8 +64,8 @@ public:
|
||||
delete properties;
|
||||
}
|
||||
|
||||
MP4::Tag *tag;
|
||||
MP4::Atoms *atoms;
|
||||
MP4::Tag *tag;
|
||||
MP4::Atoms *atoms;
|
||||
MP4::Properties *properties;
|
||||
};
|
||||
|
||||
@ -100,18 +117,6 @@ MP4::File::audioProperties() const
|
||||
return d->properties;
|
||||
}
|
||||
|
||||
bool
|
||||
MP4::File::checkValid(const MP4::AtomList &list)
|
||||
{
|
||||
for(uint i = 0; i < list.size(); i++) {
|
||||
if(list[i]->length == 0)
|
||||
return false;
|
||||
if(!checkValid(list[i]->children))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
MP4::File::read(bool readProperties)
|
||||
{
|
||||
@ -119,7 +124,7 @@ MP4::File::read(bool readProperties)
|
||||
return;
|
||||
|
||||
d->atoms = new Atoms(this);
|
||||
if (!checkValid(d->atoms->atoms)) {
|
||||
if(!checkValid(d->atoms->atoms)) {
|
||||
setValid(false);
|
||||
return;
|
||||
}
|
||||
|
@ -115,9 +115,7 @@ namespace TagLib {
|
||||
bool save();
|
||||
|
||||
private:
|
||||
|
||||
void read(bool readProperties);
|
||||
bool checkValid(const MP4::AtomList &list);
|
||||
|
||||
class FilePrivate;
|
||||
FilePrivate *d;
|
||||
|
Loading…
Reference in New Issue
Block a user