1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-03 05:10:03 +02:00
FFmpeg/tests/fate
Andreas Rheinhardt c602deb138 avformat/mux: Preserve sync even if later packet has negative ts
write_packet() has code to shift the packets timestamps
to make them nonnegative or even make them start at ts zero;
this code inspects every packet that is written and if a packet
with negative timestamp (whether this is dts or pts depends upon
another flag; basically: Matroska uses pts, everyone else dts)
is encountered, this is offset to make the timestamp zero.
All further packets will be offset accordingly (with the offset
converted according to the streams' timebases).

This is based around an assumption, namely that the timestamps
are indeed non-decreasing, so that the first packet with negative
timestamps is the first packet with timestamps. This assumption
is often fulfilled given that the default interleavement function
by default interleaves per dts; yet there are scenarios in which
it may not be fulfilled:
a) av_write_frame() instead of av_interleaved_write_frame() is used.
b) The audio_preload option is used.
c) When the timestamps that are made nonnegative/zero are pts
(i.e. with Matroska), because the packet with the smallest dts
is not necessarily the packet with the smallest pts.
d) Possibly with custom interleavement functions.
In these cases the relative sync of the first few packet(s) is offset
relative to the later packets. This contradicts the documentation
("When shifting is enabled, all output timestamps are shifted by
the same amount").

Therefore this commit changes this: As soon as the first packet
with valid timestamps is output, it is checked and recorded whether
the timestamps need to be shifted. Further packets are no longer
checked for needing to be offset; instead they are simply offset.
In the cases above this leads to packets with negative timestamps
(and the appropriate warnings) instead of desync. This will mostly
be fixed in the next commit.

This commit also factors handling the avoid_negative_ts stuff out
of write_packet() in order to be able to return immediately.

Tickets #4536 and #5784 as well as the matroska-avoid-negative-ts-test
are examples of c); as has been said, some timestamps are now negative,
yet the ref file update does not show it because ffmpeg.c sanitizes
the timestamps (-copyts disables it; ffprobe and mkvinfo also show
the original timestamps).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-21 16:47:38 +01:00
..
aac.mak fate-aac: use the fast coder for tests 2021-05-21 19:28:50 +02:00
ac3.mak avcodec/options_table: Treat (request_)channel_layout as channel layout 2021-08-15 23:19:35 +02:00
acodec.mak fate: add adpcm_ima_ws test 2021-04-26 19:56:33 +10:00
adpcm.mak fate: add adpcm_ima_ws test in a VQA v3 file 2021-04-29 23:52:46 +10:00
alac.mak
als.mak fate/als: Add test for conformance file with 512 channels. 2019-08-24 09:33:44 +02:00
amrnb.mak fate/amr[nw]b: Add remux tests 2022-01-08 18:09:58 +01:00
amrwb.mak fate/amrwb: Fix container type 2022-01-08 18:10:56 +01:00
api.mak tests: drop api-codec-param test 2020-12-10 09:46:30 +01:00
apng.mak fate: add a more extensive test for APNG_DISPOSE_OP_BACKGROUND 2021-05-14 11:15:13 +02:00
atrac.mak
audio.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
bmp.mak fate: add scale filters for big-endian architectures. 2020-09-30 16:39:34 +02:00
build.mak Merge commit 'db869f4ea4405fb8f9736e5ecdca70f77621a28e' 2017-10-11 19:02:04 -03:00
caf.mak fate/caf: Add remux tests 2021-09-27 07:08:53 +02:00
canopus.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
cbs.mak avcodec/av1dec: avoid probing with av1dec 2020-10-06 11:28:12 -03:00
cdxl.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
checkasm.mak swscale/x86/output.asm: add x86-optimized planer gbr yuv2anyX functions 2022-01-11 16:33:17 -03:00
concatdec.mak
cover-art.mak fate/cover-art: Add test for muxing cover arts to FLAC 2021-10-07 22:09:04 +02:00
dca.mak avcodec/options_table: Treat (request_)channel_layout as channel layout 2021-08-15 23:19:35 +02:00
demux.mak fate/demux: Move Sony OpenMG audio (oma) test into a new file 2021-09-27 07:08:59 +02:00
dfa.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
dnn.mak tests/dnn: Make DNN tests regular libavfilter tests 2021-12-19 00:46:29 +01:00
dnxhd.mak fate: add scale filters for big-endian architectures. 2020-09-30 16:39:34 +02:00
dpcm.mak
ea.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
exif.mak
ffmpeg.mak fate/ffmpeg: add missing samples dependency to fate-shortest 2022-01-16 00:32:52 -03:00
ffprobe.mak fate/ffprobe: Verify ffprobe XML output against schema file 2021-07-13 08:57:23 +02:00
fft.mak fft: remove 16-bit FFT and MDCT code 2021-01-14 01:44:21 +01:00
fifo-muxer.mak tests/fate/fifo-muxer: update fifo-muxer dependencies 2017-05-08 08:42:00 +02:00
filter-audio.mak FATE: always pass -nostdin to ffmpeg 2021-12-22 18:38:40 -06:00
filter-video.mak vf_paletteuse: fix color cache lookup for Bayer dithering mode. 2022-01-17 01:31:06 +05:30
fits.mak FATE: always pass -nostdin to ffmpeg 2021-12-22 18:38:40 -06:00
flac.mak
flvenc.mak FATE: always pass -nostdin to ffmpeg 2021-12-22 18:38:40 -06:00
gapless.mak fate/demux, gapless, image: Add missing ffprobe dependencies 2021-09-19 23:52:20 +02:00
gif.mak fate: add scale filters for big-endian architectures. 2020-09-30 16:39:34 +02:00
h264.mak FATE: stop using numeric arguments to -vsync 2021-12-07 11:23:45 +01:00
hap.mak FATE: always pass -nostdin to ffmpeg 2021-12-22 18:38:40 -06:00
hevc.mak fate: Limit Dolby Vision RPU test frame count 2022-01-04 11:59:41 +01:00
hlsenc.mak FATE: always pass -nostdin to ffmpeg 2021-12-22 18:38:40 -06:00
hw.mak tests: Add EXESUF to program calls. 2019-04-19 01:11:39 +02:00
id3v2.mak fate/id3v2: Add test for id3v2 chapters 2021-04-18 02:20:30 +02:00
image.mak fate/image: Modify aliaspix tests to also cover the encoder 2021-10-07 11:56:53 +02:00
indeo.mak
lavf-audio.mak fate: add wav chapters test 2020-09-07 19:04:09 +02:00
lavf-container.mak fate/lavf-container: add an AV1 in Matroska muxing test 2020-01-26 12:41:32 -03:00
lavf-image2pipe.mak tests: Convert image2pipe tests to non-legacy test scripts 2019-02-16 18:15:11 +01:00
lavf-image.mak fate/lavf-image: fix passed arguments for some high bit depth tests 2019-03-14 17:15:28 -03:00
lavf-video.mak tests/fate/lavf-video.mak: fix fate-lavf-gif dependencies 2020-01-30 20:30:36 +01:00
libavcodec.mak avcodec/tests/utils: Rename to avcodec 2021-09-26 12:56:08 +02:00
libavdevice.mak
libavformat.mak avformat/imf: Tests 2021-12-31 17:26:01 +10:00
libavutil.mak tests: Add EXESUF to program calls. 2019-04-19 01:11:39 +02:00
libswresample.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
libswscale.mak fate/libswcale: add missing samples dependency to sws-slice tests 2022-01-03 09:42:38 -03:00
lossless-audio.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
lossless-video.mak tests: stop using -vsync drop 2020-12-10 09:53:52 +01:00
matroska.mak avformat/mux: Preserve sync even if later packet has negative ts 2022-01-21 16:47:38 +01:00
microsoft.mak fate: add scale filters for big-endian architectures. 2020-09-30 16:39:34 +02:00
monkeysaudio.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
mov.mak FATE: stop using numeric arguments to -vsync 2021-12-07 11:23:45 +01:00
mp3.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
mpc.mak fate: Convert the musepack8 test to an oneoff test 2020-11-17 23:47:31 +02:00
mpeg4.mak FATE: stop using numeric arguments to -vsync 2021-12-07 11:23:45 +01:00
mpegps.mak fate: Fix dependencies to sample files to use local paths 2019-12-12 11:27:55 +02:00
mpegts.mak avformat/mpegts: add merge_pmt_versions option 2018-05-18 19:00:29 -07:00
mxf.mak fate/mxf: Fix d10-user-comments test 2021-02-16 22:50:08 +01:00
oma.mak fate/oma: Add remux tests for ATRAC3 and ATRAC3P 2021-09-27 07:08:59 +02:00
opus.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
pcm.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
pixfmt.mak fate/pixfmt: test xyz12le 2021-08-29 18:44:46 +02:00
pixlet.mak fate: add scale filters for big-endian architectures. 2020-09-30 16:39:34 +02:00
probe.mak
prores.mak fate: add scale filters for big-endian architectures. 2020-09-30 16:39:34 +02:00
qt.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
qtrle.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
real.mak
screen.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
seek.mak tests/fate: Don't keep unnecessary temp files 2021-03-05 09:24:34 +01:00
segment.mak FATE: always pass -nostdin to ffmpeg 2021-12-22 18:38:40 -06:00
source-check.sh tests/fate/source-check: Use git grep in place of grep 2017-03-30 03:12:05 +02:00
source.mak
speedhq.mak speedhq: add FATE tests 2017-08-03 16:36:02 -03:00
subtitles.mak fate/subtitles: Fix check for fate-binsub-mksenc test 2022-01-08 18:16:17 +01:00
truehd.mak avcodec/options_table: Treat (request_)channel_layout as channel layout 2021-08-15 23:19:35 +02:00
utvideo.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
vcodec.mak FATE: stop using numeric arguments to -vsync 2021-12-07 11:23:45 +01:00
video.mak Revert "fate: Add test for ticket 6024, truncated decoding mode" 2021-09-20 00:23:52 +02:00
voice.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
vorbis.mak fate/oggvorbis: Fix tests after fixing AV_PKT_DATA_SKIP_SAMPLES 2021-07-12 09:55:21 +02:00
vpx.mak fate: drop the vp8-alpha test 2021-05-09 11:07:20 +02:00
vqf.mak Merge commit '4141a5a240fba44b4b4a1c488c279d7dd8a11ec7' 2017-10-03 21:28:07 -03:00
wavpack.mak avformat/matroskaenc: Pass dispositions through unchanged by default 2021-08-24 04:23:29 +02:00
wma.mak avcodec/wmadec: fix WMA gapless playback 2021-09-12 22:23:35 +02:00
xvid.mak