mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
NowPlaying.dll: Applied a few fixes to TagLib
This commit is contained in:
parent
04e6446531
commit
62f80d9556
@ -51,7 +51,8 @@ public:
|
|||||||
static const StringHandler *stringHandler;
|
static const StringHandler *stringHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
const ID3v1::StringHandler *ID3v1::Tag::TagPrivate::stringHandler = new StringHandler;
|
static const StringHandler defaultStringHandler;
|
||||||
|
const ID3v1::StringHandler *ID3v1::Tag::TagPrivate::stringHandler = &defaultStringHandler;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// StringHandler implementation
|
// StringHandler implementation
|
||||||
@ -189,7 +190,9 @@ void ID3v1::Tag::setTrack(uint i)
|
|||||||
|
|
||||||
void ID3v1::Tag::setStringHandler(const StringHandler *handler)
|
void ID3v1::Tag::setStringHandler(const StringHandler *handler)
|
||||||
{
|
{
|
||||||
delete TagPrivate::stringHandler;
|
if(TagPrivate::stringHandler != &defaultStringHandler)
|
||||||
|
delete TagPrivate::stringHandler;
|
||||||
|
|
||||||
TagPrivate::stringHandler = handler;
|
TagPrivate::stringHandler = handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,9 +73,8 @@ FrameFactory *FrameFactory::factory = 0;
|
|||||||
|
|
||||||
FrameFactory *FrameFactory::instance()
|
FrameFactory *FrameFactory::instance()
|
||||||
{
|
{
|
||||||
if(!factory)
|
static FrameFactory factory;
|
||||||
factory = new FrameFactory;
|
return &factory;
|
||||||
return factory;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Frame *FrameFactory::createFrame(const ByteVector &data, bool synchSafeInts) const
|
Frame *FrameFactory::createFrame(const ByteVector &data, bool synchSafeInts) const
|
||||||
|
Loading…
Reference in New Issue
Block a user