[FFmpeg-cvslog] commit: prevent integer overflow in calculating duration (John Wimer )

git at videolan.org git
Mon Jan 17 16:08:07 CET 2011


ffmpeg | branch: master | John Wimer <john at god.vtic.net> | Mon Jan 17 16:00:17 2011 +0100| [b79c3df08807c96a945d9cea21c5d923c464d622] | committer: Martin Storsj? 

prevent integer overflow in calculating duration

Signed-off-by: Martin Storsj? <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b79c3df08807c96a945d9cea21c5d923c464d622
---

 libavformat/applehttp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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;




More information about the ffmpeg-cvslog mailing list