projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1de842c
)
Add a couple of asserts.
author
Carl Hetherington
<cth@carlh.net>
Mon, 15 May 2017 23:21:59 +0000
(
00:21
+0100)
committer
Carl Hetherington
<cth@carlh.net>
Mon, 15 May 2017 23:21:59 +0000
(
00:21
+0100)
src/lib/ffmpeg_encoder.cc
patch
|
blob
|
history
diff --git
a/src/lib/ffmpeg_encoder.cc
b/src/lib/ffmpeg_encoder.cc
index f26f66bfff320e909b598a54799eb183f8791ed6..eb7d476a834788605aecad224a384567367b5602 100644
(file)
--- a/
src/lib/ffmpeg_encoder.cc
+++ b/
src/lib/ffmpeg_encoder.cc
@@
-300,7
+300,10
@@
FFmpegEncoder::audio_frame (int size)
AVFrame* frame = av_frame_alloc ();
DCPOMATIC_ASSERT (frame);
+ DCPOMATIC_ASSERT (size);
+
int const channels = _audio_codec_context->channels;
+ DCPOMATIC_ASSERT (channels);
int const buffer_size = av_samples_get_buffer_size (0, channels, size, _audio_codec_context->sample_fmt, 0);
DCPOMATIC_ASSERT (buffer_size >= 0);