changeset 1027:1579256f1418 libavformat

use 64bit types
author bcoudurier
date Thu, 23 Mar 2006 12:11:51 +0000
parents 3cf3b7a81b26
children ed0b03fddd01
files mov.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mov.c	Wed Mar 22 16:49:05 2006 +0000
+++ b/mov.c	Thu Mar 23 12:11:51 2006 +0000
@@ -322,7 +322,7 @@
     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) */
     AVFormatContext *fc;
     int time_scale;
-    int duration; /* duration of the longest track */
+    int64_t duration; /* duration of the longest track */
     int found_moov; /* when both 'moov' and 'mdat' sections has been found */
     int found_mdat; /* we suppose we have enough data to read the file */
     int64_t mdat_size;
@@ -1282,7 +1282,7 @@
 
         dprintf("sample_count=%d, sample_duration=%d\n",sample_count,sample_duration);
 
-        duration+=sample_duration*sample_count;
+        duration+=(int64_t)sample_duration*sample_count;
         total_sample_count+=sample_count;
     }