Commit Graph

29 Commits

Author SHA1 Message Date
Diego Biurrun 3526ab891c qt-faststart: Undefine fseeko/ftello before defining them
This avoids a number of redefinition warnings on MinGW64.
2014-08-22 18:35:20 +02:00
Lou Logan 700687ebe0 qt-faststart: Add a note about the -movflags +faststart feature
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-03-01 00:25:17 +02:00
Martin Storsjö ea7f79f937 qt-faststart: Avoid unintentionally sign extending BE_32
Without this cast, the BE_32() expression is sign extended when
assigned to an uint64_t, since the uint8_t|uint8_t expression
is promoted to an int.

Also avoid undefined behaviour when left shifting an uint8_t
by 24 by casting it to an uint32_t explicitly before shifting.

Based on a patch by Michael Niedermayer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-03-01 00:25:08 +02:00
Michael Niedermayer bb95334c34 qt-faststart: Check offset_count before reading from the moov_atom buffer
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-03-01 00:25:04 +02:00
Michael Niedermayer 6384885425 qt-faststart: Check the ftello() return codes
This silences a warning in the coverity static analyzer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-03-01 00:25:00 +02:00
Michael Niedermayer 03c2a66fcf 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>
2014-03-01 00:24:55 +02:00
Michael Niedermayer 5612244351 qt-faststart: Check fseeko() return codes
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-03-01 00:24:52 +02:00
Michael Niedermayer ea15a9a5d8 qt-faststart: Simplify code by using a MIN() macro
qt-faststart doesn't use the normal libav headers at all since
it's supposed to be a completely standalone tool, so we implement
the macro locally in this file.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-03-01 00:24:47 +02:00
Martin Storsjö 3cbc7ef3d6 qt-faststart: Increase the copy buffer size to 64 KB
Copying data in chunks of 1 KB is a little wasteful.

64 KB should still easily fit on the stack, so there's no need
to allocate it dynamically.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-03-01 00:24:42 +02:00
Martin Storsjö dd4169ab92 qt-faststart: Use other seek/tell functions on MSVC than on mingw
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-29 00:23:34 +03:00
Diego Biurrun 4e81b5f517 tools: K&R reformatting cosmetics 2012-01-25 15:31:11 +01:00
Diego Biurrun cd8d84575b qt-faststart: K&R reformatting; fix comment typos 2011-12-30 21:14:07 +01:00
Martin Storsjö cf4afe0be6 qt-faststart: Fix up indentation
This restores indentation after 65b875d8fc.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-12-29 19:15:28 +02:00
Mans Rullgard 2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Baptiste Coudurier 91a4abd8f5 fail if input and output are the same
Originally committed as revision 23672 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-21 01:05:30 +00:00
Martin Storsjö 86e09922a5 qt-faststart: Abort scanning of the input file if a badly sized atom is encountered
If the atom size is 0, qt-faststart currently hangs forever while scanning
the file.

Originally committed as revision 23129 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-13 19:22:56 +00:00
Martin Storsjö 2ef9fd8e9b Cosmetics: Initialize pointers with NULL instead of 0, for consistency
Originally committed as revision 23127 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-13 19:18:27 +00:00
Martin Storsjö e3d7269fc8 Cosmetics: reindent
Originally committed as revision 23126 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-13 19:17:49 +00:00
Martin Storsjö c937454d89 qt-faststart: Use the error_out cleanup code path for all error returns
Originally committed as revision 23125 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-13 19:17:15 +00:00
Martin Storsjö 6ad533b7cb qt-faststart: Avoid leaking memory if encountering a file with double ftyp atoms
Originally committed as revision 23065 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-09 17:46:42 +00:00
Martin Storsjö d296a658cf qt-faststart: Free ftyp_atom at all exit points
Originally committed as revision 23008 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-01 21:05:28 +00:00
Martin Storsjö 331cb6c3e8 Reindent after the previous commit
Originally committed as revision 23007 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-01 21:03:52 +00:00
Martin Storsjö d50fc2d07b Remove unnecessary checks before calling free
Feel free to revert if you can specify a concrete case where this actually
is necessary.

Originally committed as revision 23006 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-01 21:02:23 +00:00
Frank Barchard 65b875d8fc print atom info during parsing, patch by Frank Barchard, fbarchard at google dot com
Originally committed as revision 19435 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-15 08:57:27 +00:00
Frank Barchard 31457d7a2e Do not fail if 'uuid' atom is encountered before 'moov'.
Patch by Frank Barchard, fbarchard at google dot com.

Originally committed as revision 19354 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-06 05:36:14 +00:00
Frank Barchard 06a497afab Use slightly more appropriate format strings for printing decimal values.
patch by Frank Barchard, fbarchard google com

Originally committed as revision 19315 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-01 13:46:26 +00:00
Frank Barchard cb28f95454 Use more portable 'PRId64' instead of 'llx' as conversion/length specifier.
patch by Frank Barchard, fbarchard google com

Originally committed as revision 19309 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-30 15:11:51 +00:00
Mike Melanson 3c16e03dbc correct build documentation for qt-faststart utility
Originally committed as revision 13199 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-19 04:57:57 +00:00
Måns Rullgård c07ed8c8a2 create and populate "tools" directory
Originally committed as revision 9634 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-13 21:33:24 +00:00