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@martin.st>
This commit is contained in:
Michael Niedermayer 2012-10-29 22:05:33 +01:00 committed by Martin Storsjö
parent 5612244351
commit 03c2a66fcf
1 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ int main(int argc, char *argv[])
uint32_t atom_type = 0; uint32_t atom_type = 0;
uint64_t atom_size = 0; uint64_t atom_size = 0;
uint64_t atom_offset = 0; uint64_t atom_offset = 0;
uint64_t last_offset; int64_t last_offset;
unsigned char *moov_atom = NULL; unsigned char *moov_atom = NULL;
unsigned char *ftyp_atom = NULL; unsigned char *ftyp_atom = NULL;
uint64_t moov_atom_size; uint64_t moov_atom_size;
@ -97,7 +97,7 @@ int main(int argc, char *argv[])
uint64_t i, j; uint64_t i, j;
uint32_t offset_count; uint32_t offset_count;
uint64_t current_offset; uint64_t current_offset;
uint64_t start_offset = 0; int64_t start_offset = 0;
unsigned char copy_buffer[COPY_BUFFER_SIZE]; unsigned char copy_buffer[COPY_BUFFER_SIZE];
int bytes_to_copy; int bytes_to_copy;