summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-12-19 13:53:30 +0100
committerCarl Hetherington <cth@carlh.net>2019-12-19 13:53:30 +0100
commit0d786493ef12f2d9a6d8a27d2c47b67f2e00c333 (patch)
tree2a306b31e9f96dff863bf6215b4b7f26499b07d7 /src/lib/ffmpeg_decoder.cc
parentb5335ed37e52c216a6773789c0edba5f335c8df2 (diff)
Add an assertion.
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
-rw-r--r--src/lib/ffmpeg_decoder.cc1
1 files changed, 1 insertions, 0 deletions
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<FFmpegAudioStream> stream) const
case AV_SAMPLE_FMT_FLTP:
{
float** p = reinterpret_cast<float**> (_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));