@ -77,7 +77,7 @@ typedef struct MOVParseTableEntry {
static int mov_read_default ( MOVContext * c , AVIOContext * pb , MOVAtom atom ) ;
static int mov_read_mfra ( MOVContext * c , AVIOContext * f ) ;
static int64_t add_ctts_entry ( MOVS tts * * ctts_data , unsigned int * ctts_count , unsigned int * allocated_size ,
static int64_t add_ctts_entry ( MOVC tts * * ctts_data , unsigned int * ctts_count , unsigned int * allocated_size ,
int count , int duration ) ;
static int mov_metadata_track_or_disc_number ( MOVContext * c , AVIOContext * pb ,
@ -2938,7 +2938,7 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
return AVERROR ( ENOMEM ) ;
for ( i = 0 ; i < entries & & ! pb - > eof_reached ; i + + ) {
int sample_duration ;
unsigned int sample_duration ;
unsigned int sample_count ;
unsigned int min_entries = FFMIN ( FFMAX ( i + 1 , 1024 * 1024 ) , entries ) ;
MOVStts * stts_data = av_fast_realloc ( sc - > stts_data , & alloc_size ,
@ -3191,7 +3191,7 @@ static int get_edit_list_entry(MOVContext *mov,
static int find_prev_closest_index ( AVStream * st ,
AVIndexEntry * e_old ,
int nb_old ,
MOVS tts * ctts_data ,
MOVC tts * ctts_data ,
int64_t ctts_count ,
int64_t timestamp_pts ,
int flag ,
@ -3342,17 +3342,17 @@ static void fix_index_entry_timestamps(AVStream* st, int end_index, int64_t end_
* Append a new ctts entry to ctts_data .
* Returns the new ctts_count if successful , else returns - 1.
*/
static int64_t add_ctts_entry ( MOVS tts * * ctts_data , unsigned int * ctts_count , unsigned int * allocated_size ,
static int64_t add_ctts_entry ( MOVC tts * * ctts_data , unsigned int * ctts_count , unsigned int * allocated_size ,
int count , int duration )
{
MOVS tts * ctts_buf_new ;
const size_t min_size_needed = ( * ctts_count + 1 ) * sizeof ( MOVS tts ) ;
MOVC tts * ctts_buf_new ;
const size_t min_size_needed = ( * ctts_count + 1 ) * sizeof ( MOVC tts ) ;
const size_t requested_size =
min_size_needed > * allocated_size ?
FFMAX ( min_size_needed , 2 * ( * allocated_size ) ) :
min_size_needed ;
if ( ( unsigned ) ( * ctts_count ) > = UINT_MAX / sizeof ( MOVS tts ) - 1 )
if ( ( unsigned ) ( * ctts_count ) > = UINT_MAX / sizeof ( MOVC tts ) - 1 )
return - 1 ;
ctts_buf_new = av_fast_realloc ( * ctts_data , allocated_size , requested_size ) ;
@ -3486,7 +3486,7 @@ static void mov_fix_index(MOVContext *mov, AVStream *st)
int nb_old = sti - > nb_index_entries ;
const AVIndexEntry * e_old_end = e_old + nb_old ;
const AVIndexEntry * current = NULL ;
MOVS tts * ctts_data_old = msc - > ctts_data ;
MOVC tts * ctts_data_old = msc - > ctts_data ;
int64_t ctts_index_old = 0 ;
int64_t ctts_sample_old = 0 ;
int64_t ctts_count_old = msc - > ctts_count ;
@ -3793,7 +3793,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
unsigned int stps_index = 0 ;
unsigned int i , j ;
uint64_t stream_size = 0 ;
MOVS tts * ctts_data_old = sc - > ctts_data ;
MOVC tts * ctts_data_old = sc - > ctts_data ;
unsigned int ctts_count_old = sc - > ctts_count ;
if ( sc - > elst_count ) {
@ -4754,7 +4754,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
AVStream * st = NULL ;
FFStream * sti = NULL ;
MOVStreamContext * sc ;
MOVS tts * ctts_data ;
MOVC tts * ctts_data ;
uint64_t offset ;
int64_t dts , pts = AV_NOPTS_VALUE ;
int data_offset = 0 ;