Skip to content
Snippets Groups Projects
Commit db095d26 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Adrien Béraud
Browse files

media: fix crash on finishing call

GitLab: #925
Change-Id: I40a861b18ce075522e702edf4b60f12631a89fca
parent ef8a40c9
No related branches found
No related tags found
No related merge requests found
......@@ -688,14 +688,18 @@ MediaRecorder::flush()
if (videoFilter_) {
std::lock_guard<std::mutex> lk(mutexFilterVideo_);
videoFilter_->flush();
if (outputVideoFilter_) {
outputVideoFilter_->flush();
}
}
if (audioFilter_) {
std::lock_guard<std::mutex> lk(mutexFilterAudio_);
audioFilter_->flush();
if (outputAudioFilter_) {
outputAudioFilter_->flush();
}
}
if (encoder_)
encoder_->flush();
}
......@@ -713,14 +717,18 @@ MediaRecorder::reset()
{
std::lock_guard<std::mutex> lk2(mutexFilterVideo_);
videoFilter_.reset();
if (outputVideoFilter_) {
outputVideoFilter_.reset();
}
}
{
std::lock_guard<std::mutex> lk2(mutexFilterAudio_);
audioFilter_.reset();
if (outputAudioFilter_) {
outputAudioFilter_.reset();
}
}
}
encoder_.reset();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment