diff options
author | John Wimer <john@god.vtic.net> | 2011-01-17 16:00:17 +0100 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2011-01-17 17:05:58 +0200 |
commit | b79c3df08807c96a945d9cea21c5d923c464d622 (patch) | |
tree | e8b7184318a2f771170f99c63a0095b50328de46 /libavformat | |
parent | 348b8218f7a59374355c966dbe3b851a7275f952 (diff) | |
download | ffmpeg-b79c3df08807c96a945d9cea21c5d923c464d622.tar.gz |
prevent integer overflow in calculating duration
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/applehttp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/applehttp.c b/libavformat/applehttp.c index 4a4611c9bb..b73adcc841 100644 --- a/libavformat/applehttp.c +++ b/libavformat/applehttp.c @@ -306,7 +306,7 @@ static int applehttp_read_header(AVFormatContext *s, AVFormatParameters *ap) /* If this isn't a live stream, calculate the total duration of the * stream. */ if (c->finished) { - int duration = 0; + int64_t duration = 0; for (i = 0; i < c->variants[0]->n_segments; i++) duration += c->variants[0]->segments[i]->duration; s->duration = duration * AV_TIME_BASE; |