Go to file
James Almer af248fa117 matroskadec: Improve TTA duration calculation
Calculate the duration as accurately as possible to improve decoding of samples
where the last frame is smaller than the rest.

Example:
Take lossless-audio/luckynight-partial.tak from the FATE suit and convert it
to TTA muxed into matroska:

ffmpeg -i $(SAMPLES)/lossless-audio/luckynight-partial.tak -c:a tta lucky.mka

The framemd5 output for lucky.mka without this patch:

0,          0,          0,    46080,   184320, 7c3751ddd571d2903c3cf0ab4b3e3d0a
0,      46080,      46080,    46080,   184320, 6b70c782ba1da3f933fde2daa4f96b73
0,      92160,      92160,    46080,   184320, dcf70d89c54b9a4f0b302d4ec4fb302d
0,     138240,     138240,    46080,   184320, 48713ca38b388d2ea4abf5b86ed1226f
0,     184320,     184320,    46080,   184320, 12188a23648e7ebfb07cd6fe9197b2ea
0,     230400,     230400,    46080,   184320, 49653ab8186a5d4a044ed284671a26e0
0,     276480,     276480,    46080,   184320, 5e82c6a7fe58c7ea612c03a0a2927dd4
0,     322560,     322560,    46080,   184320, 83dc449dbd9eab5f2e8ad2b4403d6a21
0,     368640,     368640,    46080,   184320, bdd6b92c23d30978d4e802d305b0fc49

With this patch:

0,          0,          0,    46080,   184320, 7c3751ddd571d2903c3cf0ab4b3e3d0a
0,      46080,      46080,    46080,   184320, 6b70c782ba1da3f933fde2daa4f96b73
0,      92160,      92160,    46080,   184320, dcf70d89c54b9a4f0b302d4ec4fb302d
0,     138240,     138240,    46080,   184320, 48713ca38b388d2ea4abf5b86ed1226f
0,     184320,     184320,    46080,   184320, 12188a23648e7ebfb07cd6fe9197b2ea
0,     230400,     230400,    46080,   184320, 49653ab8186a5d4a044ed284671a26e0
0,     276480,     276480,    46080,   184320, 5e82c6a7fe58c7ea612c03a0a2927dd4
0,     322560,     322560,    46080,   184320, 83dc449dbd9eab5f2e8ad2b4403d6a21
0,     368640,     368640,    46080,   184320, bdd6b92c23d30978d4e802d305b0fc49
0,     414720,     414720,     4230,    16920, b50b440c5bbcecb8e9fbece643447593

The duration without this patch was calculated as 418950000000, which is bigger
than uint32_t and as such stored as 2338172288.
With this patch the duration is correctly calculated as 418950.

Signed-off-by: James Almer <jamrial@gmail.com>
Approved-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-18 02:34:39 +02:00
compat avisynth: Support video input from AviSynth 2.5 properly. 2013-08-17 14:27:25 +02:00
doc lavf/tee: add support for bitstream filtering 2013-08-16 17:58:58 +02:00
libavcodec wavpackenc: do not copy samples if they are not available 2013-08-17 22:25:49 +00:00
libavdevice lavd: Fix make checkheaders 2013-08-11 00:40:30 +02:00
libavfilter avfilter/vf_mp: remove unused sws related functions 2013-08-16 16:07:29 +02:00
libavformat matroskadec: Improve TTA duration calculation 2013-08-18 02:34:39 +02:00
libavresample Merge commit 'b5a138652ff8a5b987d3e1191e67fd9f6575527e' 2013-08-03 09:16:36 +02:00
libavutil libavutil/opt.h: Fix duplicate words 2013-08-12 19:40:29 +02:00
libpostproc postprocess_template: put rsp on the clobber list to prevent gcc from using it in "q" 2013-06-16 18:21:39 +02:00
libswresample swresample: fix negative rematrix volumns 2013-07-22 03:24:22 +02:00
libswscale swscale: change ff_dither_8x8_128 dimensions to be consistent with the others 2013-08-16 16:06:59 +02:00
presets presets: specify the codecs. 2012-05-04 18:40:36 +02:00
tests avcodec/lzwenc: Add 1 additional bit of padding for gif 2013-08-14 23:15:54 +02:00
tools Merge commit 'bea3d6f4363ff1bbbd99c1717f7498b9fdb12cfc' 2013-08-06 14:50:27 +02:00
.gitignore Rename ffadler to ffhash and expand it using the generic hash API 2013-05-16 17:58:56 +02:00
arch.mak Merge commit 'b326755989b346d0d935e0628e8865f9b2951c30' 2012-12-08 14:24:16 +01:00
Changelog avcodec/mjpegdec: Read EXIF metadata in JPEG input. 2013-08-13 00:30:34 +02:00
cmdutils_common_opts.h cmdutils_common_opts: fix indention of #if 2013-04-11 16:07:46 +02:00
cmdutils.c Merge commit '0f1fb6c0194c85483dedb93b20a5b76f6fc9d520' 2013-08-08 11:54:14 +02:00
cmdutils.h Merge commit '636ced8e1dc8248a1353b416240b93d70ad03edb' 2013-07-08 04:34:11 +02:00
common.mak Merge commit '472391b9a7e15e3bff33b016e7b6dbfa6a555975' 2013-03-28 12:12:38 +01:00
configure Revert "Merge commit of 'vdpau: remove old-style decoders'" 2013-08-17 22:17:49 +02:00
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1 cosmetics: Delete empty lines at end of file. 2012-02-09 12:26:45 +01:00
COPYING.LGPLv3
CREDITS CREDITS: redirect to Git log, remove current outdated content 2013-01-31 18:02:52 +01:00
ffmpeg_filter.c ffmpeg_filter: check that the input media type match the filter 2013-08-14 03:03:41 +02:00
ffmpeg_opt.c Merge commit '488a0fa68973d48e264d54f1722f7afb18afbea7' 2013-08-06 12:41:04 +02:00
ffmpeg.c Merge commit '488a0fa68973d48e264d54f1722f7afb18afbea7' 2013-08-06 12:41:04 +02:00
ffmpeg.h Merge commit '488a0fa68973d48e264d54f1722f7afb18afbea7' 2013-08-06 12:41:04 +02:00
ffplay.c ffplay: check for filter EOF return codes 2013-08-09 00:16:13 +02:00
ffprobe.c ffprobe: add -show_programs option 2013-07-28 16:39:06 +02:00
ffserver.c ffserver: allocate rc_eq, prevent freeing invalid pointer 2013-08-13 15:24:30 +02:00
INSTALL
library.mak Merge commit '472391b9a7e15e3bff33b016e7b6dbfa6a555975' 2013-03-28 12:12:38 +01:00
LICENSE lavfi: port perspective filter from libmpcodecs 2013-07-14 16:27:17 +00:00
MAINTAINERS MAINTAINERS: add myself as maintainer for MIPS and Zeljko Lukac as maintainer for new fixed point FFT 2013-08-13 11:57:26 +02:00
Makefile Merge commit '90f9a5830b5d332de7ebb1ab45589f1870cbd65d' 2013-05-24 13:01:41 +02:00
README README: be a tiny bit more verbose 2012-04-06 10:23:26 +02:00
RELEASE Update for 2.0 2013-07-10 02:15:43 +02:00
version.sh version.sh: handle shallow clones and snapshots. 2011-07-22 10:43:59 +02:00

FFmpeg README
-------------

1) Documentation
----------------

* Read the documentation in the doc/ directory in git.
  You can also view it online at http://ffmpeg.org/documentation.html

2) Licensing
------------

* See the LICENSE file.

3) Build and Install
--------------------

* See the INSTALL file.