Skip to content

Commit

Permalink
fix for mp4 with only one GPMF payload
Browse files Browse the repository at this point in the history
  • Loading branch information
dnewman-gpsw committed Aug 26, 2020
1 parent 2a71d17 commit 14bff2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion demo/GPMF_mp4reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ size_t OpenMP4Source(char *filename, uint32_t traktype, uint32_t traksubtype) /

totaldur += duration;
mp4->metadatalength += (double)((double)samplecount * (double)duration / (double)mp4->meta_clockdemon);
if (samplecount > 1 || entries == 0)
if (samplecount > 1 || num == 1)
mp4->basemetadataduration = mp4->metadatalength * (double)mp4->meta_clockdemon / (double)samples;
}
}
Expand Down

0 comments on commit 14bff2d

Please sign in to comment.