mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-07 20:30:41 -05:00
[external:ffmpeg] In test harness, limit to 10k download size
Otherwise, if you screw up a playlist test by including a playlist dictionary key, you'll be there for eons while it downloads all the files before erroring out.
This commit is contained in:
parent
afa4597618
commit
6d0fe752bf
1 changed files with 4 additions and 0 deletions
|
@ -270,6 +270,10 @@ def _call_downloader(self, tmpfilename, info_dict):
|
||||||
args += ['-rtmp_live', 'live']
|
args += ['-rtmp_live', 'live']
|
||||||
|
|
||||||
args += ['-i', url, '-c', 'copy']
|
args += ['-i', url, '-c', 'copy']
|
||||||
|
|
||||||
|
if self.params.get('test', False):
|
||||||
|
args += ['-fs', compat_str(self._TEST_FILE_SIZE)] # -fs limit_size (output), expressed in bytes
|
||||||
|
|
||||||
if protocol in ('m3u8', 'm3u8_native'):
|
if protocol in ('m3u8', 'm3u8_native'):
|
||||||
if self.params.get('hls_use_mpegts', False) or tmpfilename == '-':
|
if self.params.get('hls_use_mpegts', False) or tmpfilename == '-':
|
||||||
args += ['-f', 'mpegts']
|
args += ['-f', 'mpegts']
|
||||||
|
|
Loading…
Reference in a new issue