Fix regression from time re-mapping changes, which added an infinite Clip cache on accident - causing a large memory leak. Also fixing a small logic regression in FrameMapper, designed to skip audio sample re-distribution, if all settings are the same as the source file.

This commit is contained in:
Jonathan Thomas
2023-03-20 16:23:10 -05:00
parent 78a194c368
commit 59e0862eec
2 changed files with 5 additions and 4 deletions

View File

@@ -491,7 +491,8 @@ std::shared_ptr<Frame> FrameMapper::GetFrame(int64_t requested_frame)
if (info.sample_rate == mapped_frame->SampleRate() &&
info.channels == mapped_frame->GetAudioChannelsCount() &&
info.channel_layout == mapped_frame->ChannelsLayout() &&
mapped.Samples.total == mapped_frame->GetAudioSamplesCount() == samples_in_frame && is_increasing &&
mapped.Samples.total == mapped_frame->GetAudioSamplesCount() &&
mapped.Samples.total == samples_in_frame && is_increasing &&
mapped.Samples.frame_start == mapped.Odd.Frame &&
mapped.Samples.sample_start == 0 &&
mapped_frame->number == frame_number &&// in some conditions (e.g. end of stream)