Merge branch 'master' into hashremoval

This commit is contained in:
itsmattkc
2022-05-29 11:18:58 -07:00
30 changed files with 346 additions and 157 deletions
+10 -2
View File
@@ -465,6 +465,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;
@@ -479,8 +484,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);