mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Don't assume TDRC is an instance of TextIdentificationFrame (#831)
If TDRC is encrypted, FrameFactory::createFrame() returns UnknownFrame which causes problems in rebuildAggregateFrames() when it is assumed that TDRC is a TextIdentificationFrame
This commit is contained in:
parent
0b583bafd0
commit
cb9f07d9dc
@ -334,10 +334,11 @@ void FrameFactory::rebuildAggregateFrames(ID3v2::Tag *tag) const
|
||||
tag->frameList("TDAT").size() == 1)
|
||||
{
|
||||
TextIdentificationFrame *tdrc =
|
||||
static_cast<TextIdentificationFrame *>(tag->frameList("TDRC").front());
|
||||
dynamic_cast<TextIdentificationFrame *>(tag->frameList("TDRC").front());
|
||||
UnknownFrame *tdat = static_cast<UnknownFrame *>(tag->frameList("TDAT").front());
|
||||
|
||||
if(tdrc->fieldList().size() == 1 &&
|
||||
if(tdrc &&
|
||||
tdrc->fieldList().size() == 1 &&
|
||||
tdrc->fieldList().front().size() == 4 &&
|
||||
tdat->data().size() >= 5)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user