projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b5335ed
)
Add an assertion.
author
Carl Hetherington
<cth@carlh.net>
Thu, 19 Dec 2019 12:53:30 +0000
(13:53 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Thu, 19 Dec 2019 12:53:30 +0000
(13:53 +0100)
src/lib/ffmpeg_decoder.cc
patch
|
blob
|
history
diff --git
a/src/lib/ffmpeg_decoder.cc
b/src/lib/ffmpeg_decoder.cc
index 3c5a09aea965fb41e17c4562e17d35e72aa0a146..2f92b9b7c34aaa0ecd917c35693f4caf5015342e 100644
(file)
--- 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));