Skip to content

Commit

Permalink
Fix crash when switching proxy on/off
Browse files Browse the repository at this point in the history
The close() signal from the multitrack model eventuallys causes th
MLT producer to close. So do not call it when loading.
  • Loading branch information
bmatherly authored and ddennedy committed Feb 19, 2024
1 parent c01c3a7 commit 642df6f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/models/multitrackmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3359,7 +3359,16 @@ int MultitrackModel::getDuration()

void MultitrackModel::load()
{
close();
if (m_tractor) {
emit aboutToClose();
AudioLevelsTask::closeAll();
beginResetModel();
delete m_tractor;
m_tractor = nullptr;
m_trackList.clear();
endResetModel();
}

// In some versions of MLT, the resource property is the XML filename,
// but the Mlt::Tractor(Service&) constructor will fail unless it detects
// the type as tractor, and mlt_service_identify() needs the resource
Expand Down

0 comments on commit 642df6f

Please sign in to comment.