From 62ca90f0c9a47d4969feadfb22005d86783bd235 Mon Sep 17 00:00:00 2001 From: tassaron Date: Tue, 3 May 2022 07:39:54 -0400 Subject: Broken pipe raises OSError on some platforms. Catching this exception prevents the app from crashing on Windows when cancelling an export in progress, or when finishing the export if components use FFmpeg pipes themselves. --- src/video_thread.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video_thread.py b/src/video_thread.py index dc6db89..894a870 100644 --- a/src/video_thread.py +++ b/src/video_thread.py @@ -378,8 +378,8 @@ class Worker(QtCore.QObject): def closePipe(self): try: self.out_pipe.stdin.close() - except BrokenPipeError: - log.error('Broken pipe to ffmpeg!') + except (BrokenPipeError, OSError): + log.error('Broken pipe to FFmpeg!') if self.out_pipe.stderr is not None: log.error(self.out_pipe.stderr.read()) self.out_pipe.stderr.close() -- cgit v1.2.3