diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-01-09 21:09:54 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-01-09 21:09:54 +0000 |
| commit | a755eef5a73ba7299198ae4e4c95b88bb9f492ad (patch) | |
| tree | acc76bc6d650e6d69fa241f83c1f1a9f646d8df6 /src/lib/ffmpeg_decoder.cc | |
| parent | 959ced5c835030614042d49afbe49142ef5e6dfe (diff) | |
| parent | b724f5449a6ebab77b40b9d58cb19060bf408b41 (diff) | |
Merge branch '2.0' of ssh://main.carlh.net/home/carl/git/dcpomatic into 2.0
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
| -rw-r--r-- | src/lib/ffmpeg_decoder.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 2d12ef0a0..ec4e33a6e 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -177,8 +177,9 @@ FFmpegDecoder::deinterleave_audio (uint8_t** data, int size) /* Deinterleave and convert to float */ - DCPOMATIC_ASSERT ((size % (bytes_per_audio_sample() * _ffmpeg_content->audio_channels())) == 0); - + /* total_samples and frames will be rounded down here, so if there are stray samples at the end + of the block that do not form a complete sample or frame they will be dropped. + */ int const total_samples = size / bytes_per_audio_sample(); int const frames = total_samples / _ffmpeg_content->audio_channels(); shared_ptr<AudioBuffers> audio (new AudioBuffers (_ffmpeg_content->audio_channels(), frames)); |
