GstEnginePipeline: Check that audio bin exists before unref

This commit is contained in:
Jonas Kvinge 2023-02-27 18:50:09 +01:00
parent a3159423f8
commit a6d10b1fa7
1 changed files with 3 additions and 2 deletions

View File

@ -190,11 +190,12 @@ GstEnginePipeline::~GstEnginePipeline() {
pipeline_ = nullptr;
if (!pipeline_is_connected_) {
if (audiobin_ && !pipeline_is_connected_) {
gst_object_unref(GST_OBJECT(audiobin_));
audiobin_ = nullptr;
}
audiobin_ = nullptr;
}
}