Add assert.
authorCarl Hetherington <cth@carlh.net>
Sun, 19 Mar 2023 13:52:24 +0000 (14:52 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 19 Mar 2023 13:52:24 +0000 (14:52 +0100)
src/lib/resampler.cc

index 4447ccf0dfc2728ad6cffe3b78fee435c2f3ec09..2c6594a6df7cca9e519c2564040e8a94dd3a52ee 100644 (file)
@@ -81,6 +81,8 @@ Resampler::set_fast ()
 shared_ptr<const AudioBuffers>
 Resampler::run (shared_ptr<const AudioBuffers> in)
 {
+       DCPOMATIC_ASSERT(in->channels() == _channels);
+
        int in_frames = in->frames ();
        int in_offset = 0;
        int out_offset = 0;