From 5d21502ecffb794333a53bb1fec4155ceb382ae4 Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Thu, 15 Oct 2026 15:03:01 +0200 Subject: [PATCH] tests/fate/mov: add a test for seeking into AAC with container priming Decode 0.15 s of the mono AAC-LC aac-2048-priming.mov starting at 2.3 s, with the seek done on the input. The seek lands in the middle of a frame, and the reference output starts at the requested time with the partial frame. The decoder instead discards the first 1994 samples, as the container's 2048 samples of priming are applied to the first frame decoded after the seek, so the output starts late. The reference records the current output. --- tests/fate/mov.mak | 4 ++++ tests/ref/fate/mov-aac-2048-priming-seek | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100644 tests/ref/fate/mov-aac-2048-priming-seek diff --git a/tests/fate/mov.mak b/tests/fate/mov.mak index 70d147f74f..ee3cd5e940 100644 --- a/tests/fate/mov.mak +++ b/tests/fate/mov.mak @@ -151,6 +151,10 @@ fate-mov-stream-shorter-than-movie: CMD = framemd5 -flags +bitexact -i $(TARGET_ fate-mov-aac-2048-priming: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_packets -print_format compact $(TARGET_SAMPLES)/mov/aac-2048-priming.mov +# Seeking into the stream must not drop samples to the container's priming. +FATE_MOV-$(call FRAMECRC, MOV, AAC, PCM_S16LE_ENCODER ARESAMPLE_FILTER VOLUME_FILTER) += fate-mov-aac-2048-priming-seek +fate-mov-aac-2048-priming-seek: CMD = framecrc -ss 2.3 -t 0.15 -i $(TARGET_SAMPLES)/mov/aac-2048-priming.mov -af volume=0,aresample -c:a pcm_s16le + fate-mov-zombie: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_streams -show_packets -show_frames -bitexact -print_format compact $(TARGET_SAMPLES)/mov/white_zombie_scrunch-part.mov fate-mov-init-nonkeyframe: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_packets -print_format compact -select_streams v $(TARGET_SAMPLES)/mov/mp4-init-nonkeyframe.mp4 diff --git a/tests/ref/fate/mov-aac-2048-priming-seek b/tests/ref/fate/mov-aac-2048-priming-seek new file mode 100644 index 0000000000..fb0223e0d2 --- /dev/null +++ b/tests/ref/fate/mov-aac-2048-priming-seek @@ -0,0 +1,10 @@ +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout_name 0: mono +0, 1994, 1994, 1024, 2048, 0x00000000 +0, 3018, 3018, 1024, 2048, 0x00000000 +0, 4042, 4042, 1024, 2048, 0x00000000 +0, 5066, 5066, 1024, 2048, 0x00000000 +0, 6090, 6090, 525, 1050, 0x00000000