close when is done

This commit is contained in:
Jonathan Baecker 2019-06-24 15:01:49 +02:00
parent 499f7b44dd
commit 3effb577ce

View File

@ -1111,6 +1111,10 @@ def main():
logger.warning('program terminated') logger.warning('program terminated')
terminate_processes(decoder, encoder, watcher) terminate_processes(decoder, encoder, watcher)
# close encoder when nothing is to do anymore
if encoder.poll() is None:
encoder.terminate()
finally: finally:
encoder.wait() encoder.wait()