Fixing a bug when changing project Profiles... we were not correctly reinitializing the FrameMapper

This commit is contained in:
Jonathan Thomas
2017-05-24 03:20:26 -05:00
parent 724c57680e
commit a36e399b47

View File

@@ -726,7 +726,7 @@ void FrameMapper::SetJsonValue(Json::Value root) throw(InvalidFile) {
// Change frame rate or audio mapping details
void FrameMapper::ChangeMapping(Fraction target_fps, PulldownType target_pulldown, int target_sample_rate, int target_channels, ChannelLayout target_channel_layout)
{
ZmqLogger::Instance()->AppendDebugMethod("FrameMapper::ChangeMapping", "target_fps.num", target_fps.num, "target_fps.den", target_fps.num, "target_pulldown", target_pulldown, "target_sample_rate", target_sample_rate, "target_channels", target_channels, "target_channel_layout", target_channel_layout);
ZmqLogger::Instance()->AppendDebugMethod("FrameMapper::ChangeMapping", "target_fps.num", target_fps.num, "target_fps.den", target_fps.den, "target_pulldown", target_pulldown, "target_sample_rate", target_sample_rate, "target_channels", target_channels, "target_channel_layout", target_channel_layout);
// Mark as dirty
is_dirty = true;
@@ -750,6 +750,9 @@ void FrameMapper::ChangeMapping(Fraction target_fps, PulldownType target_pulldow
avresample_free(&avr);
avr = NULL;
}
// Re-init mapping
Init();
}
// Set offset relative to parent timeline