Commit Graph

38 Commits

Author SHA1 Message Date
Michael Niedermayer 0bb474f686 Merge commit 'ea15a9a5d8fa6a71af3101b2af18c4dcac07987f'
* commit 'ea15a9a5d8fa6a71af3101b2af18c4dcac07987f':
  qt-faststart: Simplify code by using a MIN() macro

Conflicts:
	tools/qt-faststart.c

See: 59003fe7c0
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-01 13:47:08 +01: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
Lou Logan 2574d62d0d tools/qt-faststart: add -movflags +faststart note 2014-01-07 10:59:04 -09:00
Michael Niedermayer 582f36ca3f tools/qt-faststart: Fix unintended sign extension of current_offset
Fixes: CID733809

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-02 23:10:44 +02:00
Michael Niedermayer 69ce34c796 tools/qt-faststart: Fix unintended sign extension of atom_size
Fixes CID733810

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-02 23:10:31 +02:00
Michael Niedermayer 0ea4742341 qt-faststart: Check offset_count
Fixes CID733836
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-13 15:07:20 +01:00
Michael Niedermayer 1838961357 qt-faststart: fix signedness of variable used to hold return code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-29 22:11:22 +01:00
Michael Niedermayer 4a2297294f qt-faststart: check return of ftello()
Fixes CID739863
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 01:32:45 +02:00
Michael Niedermayer 0de41ead6f qt-faststart: check fseeko() return codes
Fixes CID733725

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-22 22:42:51 +02:00
Michael Niedermayer 92c3173c84 qt-faststart: fix printf argument type
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-10 18:50:56 +02:00
Michael Niedermayer 59003fe7c0 qt-faststart: simplify code by using FFMIN
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-30 22:19:54 +02:00
Michael Niedermayer 610efb6773 qt-faststart: dont allocate a bigger buffer than needed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-30 22:19:54 +02:00
Jan Ehrhardt f4d9148fe2 qt-faststart: speedup
qt-faststart is terribly slow when the input file and the output file
are on a slow disk like a SD card. By increasing the copy_buffer from
1K to 32M I decreased the processing time on a sample file from
1600 seconds to 4 seconds. The timing difference is during 'copying
rest of file'.

S:\SD_VIDEO\PRG001>e:\utils\qt-faststart 00005.mp4 5.mp4
ftyp          0 32
free         32 8
mdat         40 13744391
moov   13744431 141848
 patching stco atom...
 patching stco atom...
 writing ftyp atom...
 writing moov atom...
 copying rest of file...

Execution time: 1576.259 s

S:\SD_VIDEO\PRG001>s:\utils\qt-faststart 00005.mp4 5.mp4
ftyp          0 32
free         32 8
mdat         40 13744391
moov   13744431 141848
 patching stco atom...
 patching stco atom...
 writing ftyp atom...
 writing moov atom...
 copying rest of file...

Execution time: 3.846 s

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-30 22:19:54 +02:00
Michael Niedermayer 1c66807636 Merge commit 'd488c3bcbaf7ddda42597e014deb661a7e9e2112'
* commit 'd488c3bcbaf7ddda42597e014deb661a7e9e2112':
  configure: support Bitrig OS
  yuv2rgb: handle line widths that are not a multiple of 4.
  graph2dot: Use the fallback getopt implementation if needed
  tools: Include io.h for open/read/write/close if unistd.h doesn't exist
  testprogs: Remove unused includes
  qt-faststart: Use other seek/tell functions on MSVC than on mingw
  ismindex: Include direct.h for _mkdir on windows
  sdp: Use static const char arrays instead of pointers to strings
  x86: avcodec: Drop silly "_mmx" suffixes from filenames
  x86: avcodec: Drop silly "_sse" suffixes from filenames
  sdp: Include profile-level-id for H264
  utvideoenc: use ff_huff_gen_len_table
  huffman: add ff_huff_gen_len_table
  cllc: simplify/fix swapped data buffer allocation.
  rtpdec_h264: Don't set the pixel format
  h264: Check that the codec isn't null before accessing it
  audio_frame_queue: Define af_queue_log_state before using it

Conflicts:
	libavcodec/audio_frame_queue.c
	libavcodec/h264.c
	libavcodec/huffman.h
	libavcodec/huffyuv.c
	libavcodec/utvideoenc.c
	libavcodec/x86/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-29 18:04:34 +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
Michael Niedermayer 3c5fe5b527 Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits)
  wma: Clip WMA1 and WMA2 frame length to 11 bits.
  movenc: Don't require frame_size to be set for modes other than mov
  doc: Update APIchanges with info on muxer flushing
  movenc: Reindent a block
  tools: Remove some unnecessary #undefs.
  rv20: prevent calling ff_h263_decode_mba() with unset height/width
  tools: K&R reformatting cosmetics
  Ignore generated aviocat and ismindex tools.
  build: Automatically include architecture-specific library Makefile snippets.
  indeo5: prevent null pointer dereference on broken files
  pktdumper: Use usleep instead of sleep
  cosmetics: Remove some unnecessary block braces.
  Drop unnecessary prefix from *sink* variable and struct names.
  Add a tool for creating smooth streaming manifests
  movdec: Calculate an average bit rate for fragmented streams, too
  movenc: Write the sample rate instead of time scale in the stsd atom
  movenc: Add a separate ismv/isma (smooth streaming) muxer
  movenc: Allow the caller to decide on fragmentation
  libavformat: Add a flag for muxers that support write_packet(NULL) for flushing
  movenc: Add support for writing fragmented mov files
  ...

Conflicts:
	Changelog
	cmdutils.c
	cmdutils.h
	doc/APIchanges
	ffmpeg.c
	ffplay.c
	libavfilter/Makefile
	libavformat/Makefile
	libavformat/avformat.h
	libavformat/movenc.c
	libavformat/movenc.h
	libavformat/version.h
	tools/graph2dot.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-26 02:23:56 +01:00
Diego Biurrun 4e81b5f517 tools: K&R reformatting cosmetics 2012-01-25 15:31:11 +01:00
Michael Niedermayer 1a6a088f7c Merge remote-tracking branch 'qatar/master'
* qatar/master:
  fate: whitespace cosmetics
  fate: split off video codec FATE tests into their own file
  fate: split off audio codec FATE tests into their own file
  fate: split off Electronic Arts codec FATE tests into their own file
  fate: split off QuickTime codec FATE tests into their own file
  fate: split off voice codec FATE tests into their own file
  fate: split off demuxer FATE tests into their own file
  cosmetics: Drop unnecessary parentheses around return values.
  fate: drop pointless _audio and _video suffixes from xan tests
  qt-faststart: K&R reformatting; fix comment typos
  FATE: Add test for H.264 MP4->annex.B bitstream filter.

Conflicts:
	ffplay.c
	tests/fate.mak
	tests/fate/h264.mak
	tests/fate/image.mak
	tests/fate/lossless-audio.mak
	tests/fate/lossless-video.mak
	tests/fate/qtrle.mak
	tests/fate/real.mak
	tests/fate/screen.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-31 01:16:45 +01:00
Diego Biurrun cd8d84575b qt-faststart: K&R reformatting; fix comment typos 2011-12-30 21:14:07 +01:00
Michael Niedermayer 00c0465dbc Merge remote-tracking branch 'qatar/master'
* qatar/master:
  fate: split off DPCM codec FATE tests into their own file
  fate: split off PCM codec FATE tests into their own file
  libvorbis: K&R reformatting cosmetics
  libmp3lame: K&R formatting cosmetics
  fate: Add a video test for xxan decoder
  mpegvideo_enc: K&R cosmetics (line 1000-2000).
  avconv: K&R cosmetics
  qt-faststart: Fix up indentation
  indeo4: remove two unused variables
  doxygen: cleanup style to support older doxy
  fate: add more tests for VC-1 decoder
  applehttpproto: Apply the same reload interval changes as for the demuxer
  applehttp: Use half the target duration as interval if the playlist didn't update
  applehttp: Use the last segment duration as reload interval
  lagarith: add decode support for arith rgb24 mode

Conflicts:
	avconv.c
	libavcodec/libmp3lame.c
	libavcodec/mpegvideo_enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-30 03:46:24 +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