summaryrefslogtreecommitdiff
path: root/tests/filtergraphs
diff options
context:
space:
mode:
authorCalvin Walton <calvin.walton@kepstin.ca>2019-08-30 13:28:17 -0400
committerNicolas George <george@nsup.org>2019-09-08 16:48:28 +0200
commit3ad5d4df9ce794d3eeb0f526c5f3e446bf97c616 (patch)
treef570c135d7223ef582f79765bca656ca09adaed7 /tests/filtergraphs
parent85386c36e331d1387a3ac0f322e3774c1b55dc26 (diff)
lavfi/concat: allow to support inputs with different frame rates
Right now, the concat filter does not set the frame_rate value on any of the out links. As a result, the default ffmpeg behaviour kicks in - to copy the framerate from the first input to the outputs. If a later input is higher framerate, this results in dropped frames; if a later input is lower framerate it might cause judder. This patch checks if all of the video inputs have the same framerate, and if not it sets the out link to use '1/0' as the frame rate, the value meaning "unknown/vfr". A test is added to verify the VFR behaviour. The existing test for CFR behaviour passes unchanged.
Diffstat (limited to 'tests/filtergraphs')
-rw-r--r--tests/filtergraphs/concat-vfr8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/filtergraphs/concat-vfr b/tests/filtergraphs/concat-vfr
new file mode 100644
index 0000000000..e15cb96845
--- /dev/null
+++ b/tests/filtergraphs/concat-vfr
@@ -0,0 +1,8 @@
+testsrc=r=5:n=1:d=2 [v1];
+sine=440:b=2:d=1 [a1];
+testsrc=r=15:n=1:d=1 [v2];
+sine=622:b=2:d=2 [a2];
+testsrc=r=8:n=1:d=1 [v3];
+sine=880:b=2:d=1 [a3];
+
+[v1][a1][v2][a2][v3][a3] concat=v=1:a=1:n=3