1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
FFmpeg/tests
Sasi Inguva 93db5e3fc4 lavf/mov.c: offset index timestamps by the minimum pts to make first pts zero
If the videos starts with B frame, then the minimum composition time
as computed by stts + ctts will be non-zero. Hence we need to shift
the DTS, so that the first pts is zero. This was the intention of that
code-block. However it was subtracting by the wrong amount.

For example, for one of the videos in the bug nonFormatted.mp4 we have

stts:
sample_count  duration
960           1001

ctts:
sample_count  duration
1             3003
2             0
1             3003
....

The resulting composition times are :  3003, 1001, 2002, 6006, ...

The minimum composition time or PTS is 1001, which should be used to
offset DTS. However the code block was wrongly using ctts[0] which is
3003. Hence the PTS was negative. This change computes the minimum pts
encountered while fixing the index, and then subtracts it from all the
timestamps after the edit list fixes are applied.

Samples files available from:

https://bugs.chromium.org/p/chromium/issues/detail?id=721451
https://bugs.chromium.org/p/chromium/issues/detail?id=723537

fate-suite/h264/twofields_packet.mp4 is a similar file starting with 2
B frames. Before this change the PTS of first two B-frames was -6006
and -3003, and I am guessing one of them got dropped when being decoded
and remuxed  to the framecrc before, and now it is not being dropped.

Signed-off-by: Sasi Inguva <isasi@google.com>
2017-06-09 18:13:33 +02:00
..
api tests: do not use AVFrame accessor 2017-04-23 14:47:54 +07:00
checkasm checkasm: add _fixed suffix to fixed_dsp tests 2017-06-01 13:12:20 -03:00
fate fate: add fate-adts-id3v1-demux 2017-06-05 20:22:29 -03:00
filtergraphs FATE: Add test for libavfilter/scale2ref 2017-06-05 01:50:25 +02:00
ref lavf/mov.c: offset index timestamps by the minimum pts to make first pts zero 2017-06-09 18:13:33 +02:00
.gitignore
audiogen.c
audiomatch.c
base64.c
copycooker.sh
extended.ffconcat
fate-run.sh Merge commit 'eef860dd92538764f4ab7872812914ff10384268' 2017-05-05 10:33:02 +02:00
fate-valgrind.supp
fate.sh Merge commit '35d1f726eb9fdd376ab900587fb02122b72f2b9a' 2017-05-05 09:27:18 +02:00
ffserver-regression.sh
ffserver.conf
ffserver.regression.ref
lavf-regression.sh
Makefile Merge commit '35d1f726eb9fdd376ab900587fb02122b72f2b9a' 2017-05-05 09:27:18 +02:00
md5.sh
reference.pnm
regression-funcs.sh
rotozoom.c
simple1.ffconcat
simple2.ffconcat
test.ffmeta
tiny_psnr.c
tiny_ssim.c
utils.c
videogen.c