diff --git a/src/Common/MediaSink.cpp b/src/Common/MediaSink.cpp index 53697a56..49e6ad99 100644 --- a/src/Common/MediaSink.cpp +++ b/src/Common/MediaSink.cpp @@ -77,6 +77,7 @@ void MediaSink::checkTrackIfReady_l(const Track::Ptr &track){ } void MediaSink::checkTrackIfReady(const Track::Ptr &track){ + lock_guard lck(_mtx); if (!_allTrackReady && !_trackReadyCallback.empty()) { if (track) { checkTrackIfReady_l(track);