Skip to content

Commit

Permalink
fix for handlinh stsz will all the same size fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
dnewman-gpsw committed Oct 29, 2020
1 parent 02e9bb8 commit 1ec7fce
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion GPMF_common.h
@@ -1,4 +1,4 @@
/*! @file GPMF_parser.h
/*! @file GPMF_common.h
*
* @brief GPMF Parser library include
*
Expand Down
4 changes: 2 additions & 2 deletions demo/GPMF_mp4reader.c
Expand Up @@ -2,7 +2,7 @@
*
* @brief Way Too Crude MP4|MOV reader
*
* @version 2.0.0
* @version 2.0.1
*
* (C) Copyright 2017-2020 GoPro Inc (http://gopro.com/).
*
Expand Down Expand Up @@ -487,7 +487,7 @@ size_t OpenMP4Source(char *filename, uint32_t traktype, uint32_t traksubtype) /
free(mp4->metasizes);
mp4->metasizes = 0;
}
if(num > 0 && qtsize > (num * 4))
if(num > 0 && qtsize > (num * 4) || (equalsamplesize != 0 && qtsize == 20))
{
mp4->metasize_count = num;
mp4->metasizes = (uint32_t *)malloc(num * 4);
Expand Down
2 changes: 0 additions & 2 deletions demo/GPMF_mp4reader.h
Expand Up @@ -74,8 +74,6 @@ typedef struct mp4object

uint32_t *payloadBuffer;
uint32_t payloadBufferSize;

uint32_t timeBaseFourCC;
} mp4object;

#define MAKEID(a,b,c,d) (((d&0xff)<<24)|((c&0xff)<<16)|((b&0xff)<<8)|(a&0xff))
Expand Down
2 changes: 1 addition & 1 deletion demo/GPMF_utils.h
Expand Up @@ -37,7 +37,7 @@ typedef struct mp4callbacks
uint32_t (*cbGetPayloadSize)(size_t handle, uint32_t index); // get payload size for a particular index
uint32_t* (*cbGetPayload)(size_t handle, uint32_t index); // get payload data for a particular index
uint32_t (*cbGetEditListOffsetRationalTime)(size_t handle, // get any time offset for GPMF track
int32_t* offset_numerator, uint32_t* denominator);
int32_t* offset_numerator, uint32_t* denominator);
} mp4callbacks;

double GetGPMFSampleRate(mp4callbacks cbobject, uint32_t fourcc, uint32_t timeBaseFourCC, uint32_t flags, double* in, double* out);
Expand Down

0 comments on commit 1ec7fce

Please sign in to comment.