Fix -t parameter to possibly be a float.
authorCarl Hetherington <cth@carlh.net>
Wed, 1 Dec 2021 23:30:59 +0000 (00:30 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 1 Dec 2021 23:30:59 +0000 (00:30 +0100)
hacks/make_dummy_files

index 21cb1fd587f8fe7f7fbaba588be4938936005b19..3dce41cf8d19118dc9e7ab5b5d5857d3d5cb72ae 100755 (executable)
@@ -104,7 +104,7 @@ for c in root.find('Playlist').findall('Content'):
             audio_frame_rate = int(c.find('AudioStream').find('FrameRate').text)
             names = { 1: 'mono', 2: 'stereo', 3: '3.0', 4: '4.0', 5: '4.1', 6: '5.1', 7: '6.1', 8: '7.1' }
             audio_cmd = '-f lavfi -i anullsrc=channel_layout=%s:sample_rate=%d' % (names[audio_channels], audio_frame_rate)
-        os.system('ffmpeg -t %d %s %s -shortest "%s"' % (float(video_length) / video_frame_rate, video_cmd, audio_cmd, path))
+        os.system('ffmpeg -t %f %s %s -shortest "%s"' % (float(video_length) / video_frame_rate, video_cmd, audio_cmd, path))
         c.find('Path').text = path
         c.find('Digest').text = digest_head_tail(path)
     elif type == 'Image':