From 0d786493ef12f2d9a6d8a27d2c47b67f2e00c333 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 19 Dec 2019 13:53:30 +0100 Subject: [PATCH] Add an assertion. --- src/lib/ffmpeg_decoder.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 3c5a09aea..2f92b9b7c 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -314,6 +314,7 @@ FFmpegDecoder::deinterleave_audio (shared_ptr stream) const case AV_SAMPLE_FMT_FLTP: { float** p = reinterpret_cast (_frame->data); + DCPOMATIC_ASSERT (_frame->channels <= channels); /* Sometimes there aren't as many channels in the _frame as in the stream */ for (int i = 0; i < _frame->channels; ++i) { memcpy (data[i], p[i], frames * sizeof(float)); -- 2.30.2