FFmpeg/tests
Dale Curtis 37e8edc9f5 avformat/mov: Fix trampling of ctts during seeks when sidx support is enabled.
When sidx box support is enabled, the code will skip reading all
trun boxes (each containing ctts entries for samples inthat box).

If seeks are attempted before all ctts values are known, the old
code would dump ctts entries into the wrong location. These are
then used to compute pts values which leads to out of order and
incorrectly timestamped packets.

This patch fixes ctts processing by always using the index returned
by av_add_index_entry() as the ctts_data index. When the index gains
new entries old values are reshuffled as appropriate.

This approach makes sense since the mov demuxer is already relying
on the mapping of AVIndex entries to samples for correct demuxing.

As a result of this all ctts entries are now 1-count. A followup
change will be submitted to remove support for > 1 count entries
which will simplify seeking.

Notes for future improvement:
Probably there are other boxes (stts, stsc, etc) that are impacted
by this issue... this patch only attempts to fix ctts since it
completely breaks packet timestamping.

This patch continues using an array for the ctts data, which is not
the most ideal given the rearrangement that needs to happen (via
memmove as new entries are read in). Ideally AVIndex and the ctts
data would be set-type structures so addition is always worst case
O(lg(n)) instead of the O(n^2) that exists now; this slowdown is
noticeable during seeks.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-24 11:02:22 +02:00
..
api tests: do not use AVFrame accessor 2017-04-23 14:47:54 +07:00
checkasm checkasm: add hybrid_analysis_ileave and hybrid_synthesis_deint tests to aacpsdsp 2017-07-13 17:03:28 -03:00
fate avformat/mov: Fix trampling of ctts during seeks when sidx support is enabled. 2017-08-24 11:02:22 +02:00
filtergraphs FATE: Add test for libavfilter/scale2ref 2017-06-05 01:50:25 +02:00
ref avformat/mov: Fix trampling of ctts during seeks when sidx support is enabled. 2017-08-24 11:02:22 +02:00
.gitignore
audiogen.c
audiomatch.c
base64.c
copycooker.sh
extended.ffconcat
fate-run.sh fate: use do_md5sum instead of the md5 protocol for most md5 fate tests 2017-06-18 23:19:48 +02:00
fate-valgrind.supp
fate.sh Merge commit '35d1f726eb9fdd376ab900587fb02122b72f2b9a' 2017-05-05 09:27:18 +02:00
ffserver-regression.sh tests: drop -d option from ffserver invocation 2016-11-30 22:38:10 +01:00
ffserver.conf tests/ffserver.conf: Force bitexactness in the ffmpeg command 2016-11-27 23:28:23 +01:00
ffserver.regression.ref tests/ffserver.regression.ref: Update ffserver checksums 2016-12-01 23:43:31 +01:00
lavf-regression.sh fate: add WavPack muxer test 2017-02-10 23:52:16 -03:00
Makefile speedhq: add FATE tests 2017-08-03 16:36:02 -03:00
md5.sh
reference.pnm
regression-funcs.sh tests: add -nostdin flag when calling ffmpeg 2016-10-06 18:31:07 -05:00
rotozoom.c
simple1.ffconcat
simple2.ffconcat
test.ffmeta
tiny_psnr.c
tiny_ssim.c
utils.c
videogen.c