summaryrefslogtreecommitdiff
authorMartin Storsjö <martin@martin.st>2013-10-04 07:14:49 (GMT)
committer Martin Storsjö <martin@martin.st>2013-10-04 21:01:28 (GMT)
commita4435f9235eefac8a25f1cda471486e2c37b21b5 (patch)
tree514a9eb71a253143288ee1bbc82f566e9aae0a65
parent583a287f6f48f263859df142e6f90993e4217c72 (diff)
downloadffmpeg-a4435f9235eefac8a25f1cda471486e2c37b21b5.zip
ffmpeg-a4435f9235eefac8a25f1cda471486e2c37b21b5.tar.gz
ffmpeg-a4435f9235eefac8a25f1cda471486e2c37b21b5.tar.bz2
ismindex: Change the duration field to int64_t
This reduces the risk for overflow in pathlogical cases. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat
-rw-r--r--tools/ismindex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/ismindex.c b/tools/ismindex.c
index d5cf138..a51c5b7 100644
--- a/tools/ismindex.c
+++ b/tools/ismindex.c
@@ -49,7 +49,7 @@ static int usage(const char *argv0, int ret)
struct MoofOffset {
int64_t time;
int64_t offset;
- int duration;
+ int64_t duration;
};
struct Track {
@@ -425,7 +425,7 @@ static void print_track_chunks(FILE *out, struct Tracks *tracks, int main,
fprintf(stderr, "Mismatched duration of %s chunk %d in %s and %s\n",
type, i, track->name, tracks->tracks[j]->name);
}
- fprintf(out, "\t\t<c n=\"%d\" d=\"%d\" />\n",
+ fprintf(out, "\t\t<c n=\"%d\" d=\"%"PRId64"\" />\n",
i, track->offsets[i].duration);
}
}