From 596441a4e8cf03a88113646ca6da2f90e721a38b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 22 May 2013 17:36:11 +0100 Subject: Various hacks. --- src/lib/audio_decoder.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/lib/audio_decoder.cc') diff --git a/src/lib/audio_decoder.cc b/src/lib/audio_decoder.cc index e1c93ac77..fbc66c335 100644 --- a/src/lib/audio_decoder.cc +++ b/src/lib/audio_decoder.cc @@ -30,6 +30,7 @@ using boost::shared_ptr; AudioDecoder::AudioDecoder (shared_ptr f, shared_ptr c) : Decoder (f) + , _next_audio (0) , _audio_content (c) , _output_audio_frame_rate (_audio_content->output_audio_frame_rate (f)) { @@ -104,7 +105,7 @@ AudioDecoder::emit_audio (shared_ptr data, Time time) { /* XXX: map audio to 5.1 */ - /* Maybe sample-rate convert */ + /* Maybe resample */ if (_swr_context) { /* Compute the resampled frames count and add 32 for luck */ @@ -128,6 +129,8 @@ AudioDecoder::emit_audio (shared_ptr data, Time time) } Audio (data, time); + + _next_audio = time + _film->audio_frames_to_time (data->frames()); } -- cgit v1.2.3