On Fri, 28 Feb 2014, Diego Biurrun wrote:

On Fri, Feb 28, 2014 at 12:29:04PM +0200, Martin Storsjö wrote:

This variable is assigned the return value 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.
--- a/tools/qt-faststart.c
+++ b/tools/qt-faststart.c
@@ -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;

last_offset is also unsigned and also used to hold the return value
from ftello(), so this seems incomplete.

Indeed, will fix.

Why not make them off_t instead?  That is the return value of ftello()..

Because ftello() might actually be ftello64 or _ftelli64, and all platforms might not actually have an off_t type.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to