comparison mov.c @ 1027:1579256f1418 libavformat

use 64bit types
author bcoudurier
date Thu, 23 Mar 2006 12:11:51 +0000
parents 3ac6edd709fc
children ed0b03fddd01
comparison
equal deleted inserted replaced
1026:3cf3b7a81b26 1027:1579256f1418
320 320
321 typedef struct MOVContext { 321 typedef struct MOVContext {
322 int mp4; /* set to 1 as soon as we are sure that the file is an .mp4 file (even some header parsing depends on this) */ 322 int mp4; /* set to 1 as soon as we are sure that the file is an .mp4 file (even some header parsing depends on this) */
323 AVFormatContext *fc; 323 AVFormatContext *fc;
324 int time_scale; 324 int time_scale;
325 int duration; /* duration of the longest track */ 325 int64_t duration; /* duration of the longest track */
326 int found_moov; /* when both 'moov' and 'mdat' sections has been found */ 326 int found_moov; /* when both 'moov' and 'mdat' sections has been found */
327 int found_mdat; /* we suppose we have enough data to read the file */ 327 int found_mdat; /* we suppose we have enough data to read the file */
328 int64_t mdat_size; 328 int64_t mdat_size;
329 int64_t mdat_offset; 329 int64_t mdat_offset;
330 int ni; ///< non interleaved mode 330 int ni; ///< non interleaved mode
1280 1280
1281 sc->time_rate= ff_gcd(sc->time_rate, sample_duration); 1281 sc->time_rate= ff_gcd(sc->time_rate, sample_duration);
1282 1282
1283 dprintf("sample_count=%d, sample_duration=%d\n",sample_count,sample_duration); 1283 dprintf("sample_count=%d, sample_duration=%d\n",sample_count,sample_duration);
1284 1284
1285 duration+=sample_duration*sample_count; 1285 duration+=(int64_t)sample_duration*sample_count;
1286 total_sample_count+=sample_count; 1286 total_sample_count+=sample_count;
1287 } 1287 }
1288 1288
1289 st->nb_frames= total_sample_count; 1289 st->nb_frames= total_sample_count;
1290 if(duration) 1290 if(duration)