From f08f4598f243dff5a4139f09ad00e8c643d4f0e0 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 25 Jul 2013 16:49:00 +0100 Subject: Audio position will be screwed up by resampling unless we are careful. --- src/lib/audio_decoder.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/audio_decoder.cc') diff --git a/src/lib/audio_decoder.cc b/src/lib/audio_decoder.cc index cf9e3ac51..846cdf595 100644 --- a/src/lib/audio_decoder.cc +++ b/src/lib/audio_decoder.cc @@ -48,14 +48,14 @@ AudioDecoder::AudioDecoder (shared_ptr film, shared_ptr data, AudioContent::Frame frame) +AudioDecoder::audio (shared_ptr data, AudioContent::Frame) { if (_resampler) { data = _resampler->run (data); } Audio (data, _audio_position); - _audio_position = frame + data->frames (); + _audio_position += data->frames (); } void -- cgit v1.2.3