diff options
author | pukkandan <pukkandan@gmail.com> | 2021-01-09 17:56:12 +0530 |
---|---|---|
committer | pukkandan <pukkandan@gmail.com> | 2021-01-09 18:08:07 +0530 |
commit | f5b1bca9139fcbac76dca3a6b17e69f53a885988 (patch) | |
tree | 2426a3eef3733d998bdcd0ac3d56a42f155ce7d7 /youtube_dlc/postprocessor/embedthumbnail.py | |
parent | d9eebbc7471b97f3aa58939685bd7b8f4ce35b1e (diff) | |
download | hypervideo-pre-f5b1bca9139fcbac76dca3a6b17e69f53a885988.tar.lz hypervideo-pre-f5b1bca9139fcbac76dca3a6b17e69f53a885988.tar.xz hypervideo-pre-f5b1bca9139fcbac76dca3a6b17e69f53a885988.zip |
Kill child processes when yt-dlc is killed (https://github.com/ytdl-org/youtube-dl/pull/26592)
Authored by: Unrud
Diffstat (limited to 'youtube_dlc/postprocessor/embedthumbnail.py')
-rw-r--r-- | youtube_dlc/postprocessor/embedthumbnail.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dlc/postprocessor/embedthumbnail.py b/youtube_dlc/postprocessor/embedthumbnail.py index aaf58e0a0..3055a8c28 100644 --- a/youtube_dlc/postprocessor/embedthumbnail.py +++ b/youtube_dlc/postprocessor/embedthumbnail.py @@ -14,7 +14,8 @@ from ..utils import ( PostProcessingError, prepend_extension, replace_extension, - shell_quote + shell_quote, + process_communicate_or_kill, ) @@ -128,7 +129,7 @@ class EmbedThumbnailPP(FFmpegPostProcessor): self._downloader.to_screen('[debug] AtomicParsley command line: %s' % shell_quote(cmd)) p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - stdout, stderr = p.communicate() + stdout, stderr = process_communicate_or_kill(p) if p.returncode != 0: msg = stderr.decode('utf-8', 'replace').strip() |