Skip to content

Commit 5d40406

Browse files
committed
fix #1045
1 parent eb6e369 commit 5d40406

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Source/C++/Core/Ap4Atom.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,12 @@ class AP4_AtomInspector {
108108
virtual void StartObject(const char* /* name */, unsigned int field_count = 0, bool compact = false) {}
109109
virtual void EndObject() {}
110110
virtual void AddField(const char* /* name */,
111-
AP4_UI64 /* value */,
111+
AP4_UI64 /* value */,
112112
FormatHint hint = HINT_NONE) {
113113
(void)hint; // gcc warning
114114
}
115-
virtual void AddFieldF(const char* /* name */,
116-
float /* value */,
115+
virtual void AddFieldF(const char* /* name */,
116+
float /* value */,
117117
FormatHint hint = HINT_NONE) {
118118
(void)hint; // gcc warning
119119
}

Source/C++/Core/Ap4TrunAtom.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,9 @@ AP4_TrunAtom::InspectFields(AP4_AtomInspector& inspector)
314314
}
315315
if (m_Flags & AP4_TRUN_FLAG_SAMPLE_COMPOSITION_TIME_OFFSET_PRESENT) {
316316
inspector.AddField(inspector.GetVerbosity() >= 2 ? "sample_composition_time_offset" : "c",
317-
m_Entries[i].sample_composition_time_offset);
317+
m_Version == 0 ?
318+
m_Entries[i].sample_composition_time_offset :
319+
static_cast<AP4_UI64>(static_cast<AP4_SI32>(m_Entries[i].sample_composition_time_offset)));
318320
}
319321

320322
inspector.EndObject();

0 commit comments

Comments
 (0)