From 579dfce1bae018efd73c9f5f3f31770cb401d19a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 22 Oct 2012 21:04:50 +0100 Subject: Try again to sort out the audio padding / alignment. --- src/lib/decoder.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/decoder.cc') diff --git a/src/lib/decoder.cc b/src/lib/decoder.cc index 65e5ff722..c0ad85da3 100644 --- a/src/lib/decoder.cc +++ b/src/lib/decoder.cc @@ -112,7 +112,7 @@ Decoder::process_end () in to get it to the right length. */ - int64_t const video_length_in_audio_frames = ((int64_t) _fs->dcp_length() * _fs->target_sample_rate() / _fs->frames_per_second()); + int64_t const video_length_in_audio_frames = ((int64_t) _fs->dcp_length() * _fs->audio_sample_rate() / _fs->frames_per_second()); int64_t const audio_short_by_frames = video_length_in_audio_frames - _audio_frames_processed; _log->log ( @@ -266,7 +266,7 @@ Decoder::emit_audio (uint8_t* data, int size) } /* Update the number of audio frames we've pushed to the encoder */ - _audio_frames_processed += frames; + _audio_frames_processed += audio->frames (); Audio (audio); } -- cgit v1.2.3