summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_encoder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ffmpeg_encoder.cc')
-rw-r--r--src/lib/ffmpeg_encoder.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/ffmpeg_encoder.cc b/src/lib/ffmpeg_encoder.cc
index f26f66bff..eb7d476a8 100644
--- 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);