[PATCH 1 of 3] Tests: fixed "ffmpeg -nostdin" usage in range_mp4.t

Maxim Dounin mdounin at mdounin.ru
Sat Feb 8 01:22:12 UTC 2025


# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1738716192 -10800
#      Wed Feb 05 03:43:12 2025 +0300
# Node ID 4b0715cba7825dac5bc682b16f9acf1b664aab60
# Parent  a848cb246f6cf33448d78c8596ae1e7cfcb6f042
Tests: fixed "ffmpeg -nostdin" usage in range_mp4.t.

Usage of "ffmpeg -formats" do not require "-nostdin", as terminal is
only touched after parsing options, and "-formats" will cause an early
exit during parsing.  Contrary, test mp4 file generation needs "-nostdin".

This is how it is used in other mp4 tests, but in range_mp4.t it was
somehow mixed up in 1268:1923461981c9.

diff --git a/range_mp4.t b/range_mp4.t
--- a/range_mp4.t
+++ b/range_mp4.t
@@ -48,8 +48,8 @@ http {
 EOF
 
 plan(skip_all => 'no lavfi')
-	unless grep /lavfi/, `ffmpeg -nostdin -loglevel quiet -formats`;
-system('ffmpeg -loglevel quiet -y '
+	unless grep /lavfi/, `ffmpeg -loglevel quiet -formats`;
+system('ffmpeg -nostdin -loglevel quiet -y '
 	. '-f lavfi -i testsrc=duration=10:size=320x200:rate=15 '
 	. "-pix_fmt yuv420p -c:v libx264 ${\($t->testdir())}/test.mp4") == 0
 	or die "Can't create mp4 file: $!";



More information about the nginx-devel mailing list