[SCM] libav/experimental: prevent integer overflow in calculating duration
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:22:06 UTC 2013
The following commit has been merged in the experimental branch:
commit b79c3df08807c96a945d9cea21c5d923c464d622
Author: John Wimer <john at god.vtic.net>
Date: Mon Jan 17 16:00:17 2011 +0100
prevent integer overflow in calculating duration
Signed-off-by: Martin Storsjö <martin at martin.st>
diff --git a/libavformat/applehttp.c b/libavformat/applehttp.c
index 4a4611c..b73adcc 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;
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list