diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-05-16 00:21:59 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-05-16 00:21:59 +0100 |
| commit | 85c2650c88e5a98ad9d96f73bbc081a084aa73fb (patch) | |
| tree | 44de5f1ed8133b3a336e24f4ecbfef61765c9799 /src/lib/ffmpeg_encoder.cc | |
| parent | 1de842ce398d1369845eccb31e44aa21d6edbfb7 (diff) | |
Add a couple of asserts.
Diffstat (limited to 'src/lib/ffmpeg_encoder.cc')
| -rw-r--r-- | src/lib/ffmpeg_encoder.cc | 3 |
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); |
