Skip to content

Commit 3f08c82

Browse files
committed
[FragmentSampleReader] Use custom AP4_UnknownUuidAtom
This allow to remove custom bento4 changes
1 parent 70709a4 commit 3f08c82

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/samplereader/FragmentedSampleReader.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ constexpr uint8_t MP4_TFRFBOX_UUID[] = {0xd4, 0x80, 0x7e, 0xf2, 0xca, 0x39, 0x46
3030
0x8e, 0x54, 0x26, 0xcb, 0x9e, 0x46, 0xa7, 0x9f};
3131

3232
constexpr AP4_UI32 MP4_SAMPLE_FORMAT_WVTT = AP4_ATOM_TYPE('w', 'v', 't', 't');
33+
34+
class MP4UnknownUuidAtom : public AP4_UnknownUuidAtom
35+
{
36+
public:
37+
// Expose atom data
38+
const AP4_DataBuffer& GetData() { return m_Data; }
39+
};
40+
3341
} // unnamed namespace
3442

3543

@@ -507,7 +515,7 @@ void CFragmentedSampleReader::UpdateSampleDescription()
507515

508516
void CFragmentedSampleReader::ParseTrafTfrf(AP4_UuidAtom* uuidAtom)
509517
{
510-
const AP4_DataBuffer& buf{AP4_DYNAMIC_CAST(AP4_UnknownUuidAtom, uuidAtom)->GetData()};
518+
const AP4_DataBuffer& buf{static_cast<MP4UnknownUuidAtom*>(uuidAtom)->GetData()};
511519
CCharArrayParser parser;
512520
parser.Reset(buf.GetData(), buf.GetDataSize());
513521

0 commit comments

Comments
 (0)