Skip to content

Commit

Permalink
fix for #183
Browse files Browse the repository at this point in the history
  • Loading branch information
barbibulle committed Sep 9, 2017
1 parent be7185f commit 2f267f8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Source/C++/Core/Ap4AtomSampleTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,10 @@ AP4_AtomSampleTable::GetSample(AP4_Ordinal index,
AP4_UI32 cts_offset = 0;
AP4_UI64 dts = 0;
AP4_UI32 duration = 0;
result = m_SttsAtom->GetDts(index, dts, &duration);
if (AP4_FAILED(result)) return result;
if (m_SttsAtom) {
result = m_SttsAtom->GetDts(index, dts, &duration);
if (AP4_FAILED(result)) return result;
}
sample.SetDuration(duration);
sample.SetDts(dts);
if (m_CttsAtom == NULL) {
Expand Down

0 comments on commit 2f267f8

Please sign in to comment.