From 68b680c459adb9f415f2cdaa2b60387c4df96904 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Coetzee Date: Sun, 19 Mar 2023 02:53:19 +0200 Subject: [PATCH] Fix for crash on seek Partial fix for https://github.com/CasparCG/server/issues/1451 and https://github.com/CasparCG/server/issues/1460 --- src/modules/ffmpeg/producer/av_producer.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/modules/ffmpeg/producer/av_producer.cpp b/src/modules/ffmpeg/producer/av_producer.cpp index d4898feebc..52a92e1b9a 100644 --- a/src/modules/ffmpeg/producer/av_producer.cpp +++ b/src/modules/ffmpeg/producer/av_producer.cpp @@ -205,6 +205,15 @@ class Decoder } } catch (boost::thread_interrupted&) { // Do nothing... + } catch (ffmpeg::ffmpeg_error_t& ex) { + if (auto errn = boost::get_error_info(ex)) { + if (*errn == AVERROR_EXIT) { + return; + } + } + CASPAR_LOG_CURRENT_EXCEPTION(); + } catch (...) { + CASPAR_LOG_CURRENT_EXCEPTION(); } }); }