Fixed an issue with a crashing unit test, and a broken ChangeMapping() method on the FrameMapper.

This commit is contained in:
Jonathan Thomas
2015-03-08 22:22:40 -05:00
parent 591cfbdb5a
commit 00eae62663

View File

@@ -577,6 +577,16 @@ void FrameMapper::ChangeMapping(Fraction target_fps, PulldownType target_pulldow
info.channels = target_channels;
info.channel_layout = target_channel_layout;
// Clear cache
final_cache.Clear();
// Deallocate resample buffer
if (avr) {
avresample_close(avr);
avresample_free(&avr);
avr = NULL;
}
}
// Resample audio and map channels (if needed)