Skip to content

Commit

Permalink
fix for index first mp4s
Browse files Browse the repository at this point in the history
  • Loading branch information
dnewman-gpsw committed Aug 30, 2019
1 parent 359813a commit ceb3815
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 @@ -59,7 +59,7 @@ uint32_t *GetPayload(size_t handle, uint32_t *lastpayload, uint32_t index)
uint32_t *MP4buffer = NULL;
if (index < mp4->indexcount && mp4->mediafp)
{
if ((mp4->filesize > mp4->metaoffsets[index]+mp4->metasizes[index]) && (mp4->metasizes[index] > 0))
if ((mp4->filesize >= mp4->metaoffsets[index]+mp4->metasizes[index]) && (mp4->metasizes[index] > 0))
{
MP4buffer = (uint32_t *)realloc((void *)lastpayload, mp4->metasizes[index]);

Expand Down

0 comments on commit ceb3815

Please sign in to comment.