summaryrefslogtreecommitdiff
path: root/src/lib/decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-10-22 21:04:50 +0100
committerCarl Hetherington <cth@carlh.net>2012-10-22 21:04:50 +0100
commit579dfce1bae018efd73c9f5f3f31770cb401d19a (patch)
treef7bb1b2ad0537515fe3478d9ffe46a081f3b3414 /src/lib/decoder.cc
parent71b7808830e17423453502ed5112b70bf90fff1b (diff)
Try again to sort out the audio padding / alignment.
Diffstat (limited to 'src/lib/decoder.cc')
-rw-r--r--src/lib/decoder.cc4
1 files changed, 2 insertions, 2 deletions
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);
}