project: reprobe and merge params when file changes are found

This commit is contained in:
itsmattkc
2022-05-28 12:25:50 -07:00
parent 15087b2cd2
commit fc68a123ba
10 changed files with 133 additions and 58 deletions
+10 -2
View File
@@ -485,6 +485,11 @@ void ViewerOutput::set_parameters_from_footage(const QVector<ViewerOutput *> foo
}
int ViewerOutput::AddStream(Track::Type type, const QVariant& value)
{
return SetStream(type, value, -1);
}
int ViewerOutput::SetStream(Track::Type type, const QVariant &value, int index_in)
{
QString id;
@@ -499,8 +504,11 @@ int ViewerOutput::AddStream(Track::Type type, const QVariant& value)
}
// Add another video/audio param to the array for this stream
int index = InputArraySize(id);
InputArrayAppend(id);
int index = (index_in == -1) ? InputArraySize(id) : index_in;
if (index >= InputArraySize(id)) {
InputArrayResize(id, index+1);
}
SetStandardValue(id, value, index);