1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

fate/matroska: Add test for avoiding negative timestamps

This tests the issue from tickets #4536, #5784;
the output of this test is currently broken.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2022-01-18 15:47:56 +01:00
parent 5d5b62e595
commit 92ed6ea3d7
2 changed files with 59 additions and 0 deletions

View File

@ -97,6 +97,23 @@ FATE_MATROSKA_FFMPEG_FFPROBE-$(call ALLYES, FILE_PROTOCOL PIPE_PROTOCOL \
+= fate-matroska-dovi-write-config8
fate-matroska-dovi-write-config8: CMD = transcode mov $(TARGET_SAMPLES)/hevc/dv84.mov matroska "-c copy" "-map 0 -c copy -t 0.4" "" "-show_entries stream_side_data_list -select_streams v"
# This tests the scenario like tickets #4536, #5784 where
# the first packet (with the overall lowest dts) is a video packet,
# whereas an audio packet to be muxed later has the overall lowest pts
# which happens to be negative and therefore needs to be shifted.
# This is currently buggy (the timestamps of the video frames muxed
# before the first audio frame are not shifted).
# (-ss 1.09 ensures that a video frame has the lowest dts of all packets;
# yet there is an audio packet with the overall lowest pts. output_ts_offset
# makes the pts of the audio packet, but not the leading video packet negative
# so that we run into the above issue.)
FATE_MATROSKA-$(call ALLYES, FILE_PROTOCOL MPEGTS_DEMUXER MPEGVIDEO_PARSER \
MPEG2VIDEO_DECODER EXTRACT_EXTRADATA_BSF \
MP3FLOAT_DECODER MATROSKA_MUXER \
MATROSKA_DEMUXER FRAMECRC_MUXER PIPE_PROTOCOL) \
+= fate-matroska-avoid-negative-ts
fate-matroska-avoid-negative-ts: CMD = transcode mpegts $(TARGET_SAMPLES)/mpeg2/t.mpg matroska "-c copy -ss 1.09 -output_ts_offset -60ms" "-c copy -t 0.4"
# This tests writing the MS-compatibility modes V_MS/VFW/FOURCC and A_MS/ACM.
# It furthermore tests writing the Cues at the front if the cues_to_front
# option is set and more than enough space has been reserved in advance.

View File

@ -0,0 +1,42 @@
3349536550047c5c553215003ba2acb7 *tests/data/fate/matroska-avoid-negative-ts.matroska
973070 tests/data/fate/matroska-avoid-negative-ts.matroska
#extradata 0: 22, 0x2885037c
#tb 0: 1/1000
#media_type 0: video
#codec_id 0: mpeg2video
#dimensions 0: 352x288
#sar 0: 12/11
#tb 1: 1/1000
#media_type 1: audio
#codec_id 1: mp3
#sample_rate 1: 44100
#channel_layout 1: 4
#channel_layout_name 1: mono
0, -37, 24, 40, 9156, 0xe5bd034a, S=1, 40
1, 0, 0, 26, 417, 0x7198c15e
0, 3, 3, 40, 1740, 0x29ac4480, F=0x0
0, 24, 123, 40, 3672, 0x98652013, F=0x0
1, 26, 26, 26, 417, 0x3c67c32d
1, 52, 52, 26, 417, 0x8c24b1ca
1, 78, 78, 26, 417, 0x6ee576b7
0, 83, 83, 40, 2532, 0xa2c42769, F=0x0
1, 104, 104, 26, 417, 0x407603db
0, 123, 203, 40, 1728, 0xae823d3b, F=0x0
1, 130, 130, 26, 417, 0xcf2804d2
1, 156, 156, 26, 417, 0xcf2804d2
0, 163, 163, 40, 1028, 0x286ac52a, F=0x0
1, 182, 182, 26, 417, 0xcf2804d2
0, 203, 283, 40, 1916, 0xd378899e, F=0x0
1, 208, 208, 26, 417, 0xcf2804d2
1, 235, 235, 26, 417, 0xcf2804d2
0, 243, 243, 40, 1168, 0x424e12cf, F=0x0
1, 261, 261, 26, 417, 0xcf2804d2
0, 283, 363, 40, 1660, 0x5cec156c, F=0x0
1, 287, 287, 26, 417, 0xcf2804d2
1, 313, 313, 26, 417, 0xef163d04
0, 323, 323, 40, 1004, 0xac0dce29, F=0x0
1, 339, 339, 26, 417, 0x2a009b3a
0, 363, 443, 40, 3008, 0x0fc798bf, F=0x0
1, 365, 365, 26, 417, 0xbedccb9d
1, 365, 365, 26, 417, 0x2214be3f
1, 391, 391, 26, 417, 0x8953b878