comparison mp4.t @ 1268:1923461981c9

Tests: prevent broken terminal after tc[gs]etattr ffmpeg race. Running multiple ffmpeg processes could lead to save/restore of the already alternated terminal state.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 11 Jan 2018 19:23:45 +0300
parents 766bcbb632ee
children 1220f0055135
comparison
equal deleted inserted replaced
1267:f94e79aad895 1268:1923461981c9
51 51
52 EOF 52 EOF
53 53
54 plan(skip_all => 'no lavfi') 54 plan(skip_all => 'no lavfi')
55 unless grep /lavfi/, `ffmpeg -loglevel quiet -formats`; 55 unless grep /lavfi/, `ffmpeg -loglevel quiet -formats`;
56 system('ffmpeg -loglevel quiet -y ' 56 system('ffmpeg -nostdin -loglevel quiet -y '
57 . '-f lavfi -i testsrc=duration=10:size=320x200:rate=15 ' 57 . '-f lavfi -i testsrc=duration=10:size=320x200:rate=15 '
58 . '-f lavfi -i testsrc=duration=20:size=320x200:rate=15 ' 58 . '-f lavfi -i testsrc=duration=20:size=320x200:rate=15 '
59 . '-map 0:0 -map 1:0 -pix_fmt yuv420p -g 15 -c:v libx264 ' 59 . '-map 0:0 -map 1:0 -pix_fmt yuv420p -g 15 -c:v libx264 '
60 . "${\($t->testdir())}/test.mp4") == 0 60 . "${\($t->testdir())}/test.mp4") == 0
61 or die "Can't create mp4 file: $!"; 61 or die "Can't create mp4 file: $!";
62 system('ffmpeg -loglevel quiet -y ' 62 system('ffmpeg -nostdin -loglevel quiet -y '
63 . '-f lavfi -i testsrc=duration=10:size=320x200:rate=15 ' 63 . '-f lavfi -i testsrc=duration=10:size=320x200:rate=15 '
64 . '-f lavfi -i testsrc=duration=20:size=320x200:rate=15 ' 64 . '-f lavfi -i testsrc=duration=20:size=320x200:rate=15 '
65 . '-map 0:0 -map 1:0 -pix_fmt yuv420p -g 15 -c:v libx264 ' 65 . '-map 0:0 -map 1:0 -pix_fmt yuv420p -g 15 -c:v libx264 '
66 . '-movflags +faststart ' 66 . '-movflags +faststart '
67 . "${\($t->testdir())}/no_mdat.mp4") == 0 67 . "${\($t->testdir())}/no_mdat.mp4") == 0