From 8fd4f29b06cf946df927ebfa3204e253357c77cf Mon Sep 17 00:00:00 2001 From: Thulinma Date: Tue, 30 Jan 2024 22:44:43 +0100 Subject: [PATCH] Fix MistProcMKVExec segfault --- src/output/output_ebml.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/output/output_ebml.cpp b/src/output/output_ebml.cpp index 8c869f36..9aa150f2 100644 --- a/src/output/output_ebml.cpp +++ b/src/output/output_ebml.cpp @@ -48,7 +48,7 @@ namespace Mist{ } if (config->getString("target").find(".webm") != std::string::npos){doctype = "webm";} initialize(); - if (!M.getLive()){calcVodSizes();} + if (M && !M.getLive()){calcVodSizes();} } } @@ -503,6 +503,7 @@ namespace Mist{ return; } size_t idx = getMainSelectedTrack(); + if (idx == INVALID_TRACK_ID){return;} double duration = M.getLastms(idx) - M.getFirstms(idx); // Calculate the segment size // Segment contains SeekHead, Info, Tracks, Cues (in that order)