[FFmpeg-cvslog] avformat/asfdec: Use 64bit ret to avoid overflow

Michael Niedermayer git at videolan.org
Sat Mar 21 02:30:00 CET 2015


ffmpeg | branch: release/2.5 | Michael Niedermayer <michaelni at gmx.at> | Fri Feb 20 19:29:12 2015 +0100| [c7565b143c44af15025e0a4a8d6f57f89ba6840a] | committer: Michael Niedermayer

avformat/asfdec: Use 64bit ret to avoid overflow

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit d4936d28a11fac6c9c4b4df9625185f93b086986)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/asfdec.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 7f7bb4d..ffd9591 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -1484,7 +1484,7 @@ static int asf_build_simple_index(AVFormatContext *s, int stream_index)
     ff_asf_guid g;
     ASFContext *asf     = s->priv_data;
     int64_t current_pos = avio_tell(s->pb);
-    int ret = 0;
+    int64_t ret;
 
     if((ret = avio_seek(s->pb, asf->data_object_offset + asf->data_object_size, SEEK_SET)) < 0) {
         return ret;
@@ -1554,7 +1554,7 @@ static int asf_read_seek(AVFormatContext *s, int stream_index,
 
     /* Try using the protocol's read_seek if available */
     if (s->pb) {
-        int ret = avio_seek_time(s->pb, stream_index, pts, flags);
+        int64_t ret = avio_seek_time(s->pb, stream_index, pts, flags);
         if (ret >= 0)
             asf_reset_header(s);
         if (ret != AVERROR(ENOSYS))



More information about the ffmpeg-cvslog mailing list