diff --git a/ErsatzTV.FFmpeg.Tests/PipelineBuilderBaseTests.cs b/ErsatzTV.FFmpeg.Tests/PipelineBuilderBaseTests.cs index c224f2576..53f4114e9 100644 --- a/ErsatzTV.FFmpeg.Tests/PipelineBuilderBaseTests.cs +++ b/ErsatzTV.FFmpeg.Tests/PipelineBuilderBaseTests.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Text.RegularExpressions; using ErsatzTV.FFmpeg.Capabilities; using ErsatzTV.FFmpeg.Encoder; using ErsatzTV.FFmpeg.Format; @@ -536,8 +537,11 @@ public class PipelineBuilderBaseTests { string command = BuildRealtimeCommand(new BurstCapableFFmpegCapabilities()); - // burst covers the first two 4s segments, then the 1.05 throttle resumes (ersatztv#350) - command.ShouldContain("-readrate 1.05 -readrate_initial_burst 8 -i"); + // burst covers the first two 4s segments, then the 1.05 throttle resumes (ersatztv#350). + // anchor on the input path so this can't be satisfied by some other input carrying the + // burst; audio and video share one file here, so exactly one input is expected + command.ShouldContain("-readrate 1.05 -readrate_initial_burst 8 -i /tmp/whatever.mkv"); + Regex.Matches(command, "-readrate_initial_burst 8").Count.ShouldBe(1); } [Test] @@ -555,6 +559,9 @@ public class PipelineBuilderBaseTests // a still image is paced by the realtime filter, so bursting would only run audio ahead string command = BuildRealtimeCommand(new BurstCapableFFmpegCapabilities(), stillImage: true); + // the positive anchor keeps this from passing vacuously if the helper ever stops + // producing a realtime audio input at all + command.ShouldContain("-readrate 1.05"); command.ShouldNotContain("-readrate_initial_burst"); }