[FFmpeg-cvslog] qt-faststart: Fix the signedness of variables keeping the ftello return values

Michael Niedermayer git at videolan.org
Mon Mar 3 22:50:33 CET 2014


ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Mon Oct 29 22:05:33 2012 +0100| [298d66c8de1d4faa152f4ef557566aa0519223d8] | committer: Reinhard Tartler

qt-faststart: Fix the signedness of variables keeping the ftello return values

These variables are assigned the return values of ftello, which
returns an off_t, which is a signed type. On errors, ftello returns
-1, thus make sure this error return value can be stored properly.

Signed-off-by: Martin Storsjö <martin at martin.st>
(cherry picked from commit 03c2a66fcff9707f71ffef7e61ce5e3973220d4b)

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

 tools/qt-faststart.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/qt-faststart.c b/tools/qt-faststart.c
index 0abcd2b..2b2e00c 100644
--- a/tools/qt-faststart.c
+++ b/tools/qt-faststart.c
@@ -89,7 +89,7 @@ int main(int argc, char *argv[])
     uint32_t atom_type   = 0;
     uint64_t atom_size   = 0;
     uint64_t atom_offset = 0;
-    uint64_t last_offset;
+    int64_t last_offset;
     unsigned char *moov_atom = NULL;
     unsigned char *ftyp_atom = NULL;
     uint64_t moov_atom_size;
@@ -97,7 +97,7 @@ int main(int argc, char *argv[])
     uint64_t i, j;
     uint32_t offset_count;
     uint64_t current_offset;
-    uint64_t start_offset = 0;
+    int64_t start_offset = 0;
     unsigned char copy_buffer[COPY_BUFFER_SIZE];
     int bytes_to_copy;
 



More information about the ffmpeg-cvslog mailing list