[FFmpeg-devel] [PATCH 7/7] tests/fate: Remove intermediate file of flv-add_keyframe_index test
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Wed May 18 18:34:58 EEST 2022
Do this by making this test a transcode test.
Also fix the test requirements and don't add this test to FATE_AFILTER;
instead use a new variable and a new target for flvenc-tests.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
tests/fate/flvenc.mak | 14 ++++--------
tests/ref/fate/flv-add_keyframe_index | 33 +++++++++++++++++----------
2 files changed, 25 insertions(+), 22 deletions(-)
diff --git a/tests/fate/flvenc.mak b/tests/fate/flvenc.mak
index 9682f4a2ba..5032fface3 100644
--- a/tests/fate/flvenc.mak
+++ b/tests/fate/flvenc.mak
@@ -1,11 +1,5 @@
-tests/data/add_keyframe_index.flv: TAG = GEN
-tests/data/add_keyframe_index.flv: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
- $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< -nostdin \
- -f lavfi -i "sws_flags=+accurate_rnd+bitexact;testsrc=r=7:n=2:d=20" -sws_flags '+accurate_rnd+bitexact' -metadata "encoder=Lavf" -pix_fmt yuv420p -c:v flv1 -g 7 -f flv -flags +bitexact -fflags +bitexact \
- -flvflags add_keyframe_index -idct simple -dct int -y $(TARGET_PATH)/tests/data/add_keyframe_index.flv 2> /dev/null;
-
-FATE_AFILTER-$(call ALLYES, FLV_MUXER FLV_DEMUXER AVDEVICE TESTSRC_FILTER LAVFI_INDEV FLV_ENCODER) += fate-flv-add_keyframe_index
-fate-flv-add_keyframe_index: tests/data/add_keyframe_index.flv
-fate-flv-add_keyframe_index: CMD = ffmetadata -flags +bitexact -i $(TARGET_PATH)/tests/data/add_keyframe_index.flv
-
+FATE_FLVENC_FFMPEG_FFPROBE-$(call TRANSCODE, FLV, FLV, RAWVIDEO_DECODER SCALE_FILTER TESTSRC_FILTER LAVFI_INDEV) += fate-flv-add_keyframe_index
+fate-flv-add_keyframe_index: CMD = transcode "lavfi -graph testsrc=r=7:n=2:d=20" "foo" flv "-vf scale -c:v flv1 -dct int -g 7 -flvflags add_keyframe_index" "-c copy -t 0.1" "-show_entries format_tags"
+FATE_FFMPEG_FFPROBE += $(FATE_FLVENC_FFMPEG_FFPROBE-yes)
+fate-flvenc: $(FATE_FLVENC_FFMPEG_FFPROBE-yes)
diff --git a/tests/ref/fate/flv-add_keyframe_index b/tests/ref/fate/flv-add_keyframe_index
index 1c4da65d90..39c4bed85a 100644
--- a/tests/ref/fate/flv-add_keyframe_index
+++ b/tests/ref/fate/flv-add_keyframe_index
@@ -1,12 +1,21 @@
-;FFMETADATA1
-hasVideo=true
-hasKeyframes=true
-hasAudio=false
-hasMetadata=true
-canSeekToEnd=true
-datasize=629776
-videosize=629381
-audiosize=0
-lasttimestamp=20
-lastkeyframetimestamp=19
-lastkeyframelocation=597963
+5f38d76da3ed4a5be06ca604c53666f2 *tests/data/fate/flv-add_keyframe_index.flv
+630192 tests/data/fate/flv-add_keyframe_index.flv
+#tb 0: 1/1000
+#media_type 0: video
+#codec_id 0: flv1
+#dimensions 0: 320x240
+#sar 0: 0/1
+0, 0, 0, 143, 9597, 0xd91d5859
+[FORMAT]
+TAG:hasVideo=true
+TAG:hasKeyframes=true
+TAG:hasAudio=false
+TAG:hasMetadata=true
+TAG:canSeekToEnd=true
+TAG:datasize=629776
+TAG:videosize=629381
+TAG:audiosize=0
+TAG:lasttimestamp=20
+TAG:lastkeyframetimestamp=19
+TAG:lastkeyframelocation=597963
+[/FORMAT]
--
2.32.0
More information about the ffmpeg-devel
mailing list