From 797534b2e2580d3c6af461e953286e8cac39aeea Mon Sep 17 00:00:00 2001 From: Thulinma Date: Thu, 27 Jul 2023 20:24:44 +0200 Subject: [PATCH] Fix segfault when reporting loss on incoming streams that are not yet accepted --- src/output/output_webrtc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/output/output_webrtc.cpp b/src/output/output_webrtc.cpp index 5f4b5db3..299c54a5 100644 --- a/src/output/output_webrtc.cpp +++ b/src/output/output_webrtc.cpp @@ -1287,7 +1287,7 @@ namespace Mist{ if (now >= rtcpTimeoutInMillis){ std::map::iterator it; for (it = webrtcTracks.begin(); it != webrtcTracks.end(); ++it){ - if (M.getType(it->first) != "video"){continue;}//Video-only, at least for now + if (!M || M.getType(it->first) != "video"){continue;}//Video-only, at least for now sendRTCPFeedbackREMB(it->second); sendRTCPFeedbackRR(it->second); } @@ -1298,7 +1298,7 @@ namespace Mist{ if (now >= rtcpKeyFrameTimeoutInMillis){ std::map::iterator it; for (it = webrtcTracks.begin(); it != webrtcTracks.end(); ++it){ - if (M.getType(it->first) != "video"){continue;}//Video-only + if (!M || M.getType(it->first) != "video"){continue;}//Video-only sendRTCPFeedbackPLI(it->second); } rtcpKeyFrameTimeoutInMillis = now + rtcpKeyFrameDelayInMillis;