Audio position will be screwed up by resampling unless we are careful.
authorCarl Hetherington <cth@carlh.net>
Thu, 25 Jul 2013 15:49:00 +0000 (16:49 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 25 Jul 2013 15:49:00 +0000 (16:49 +0100)
src/lib/audio_decoder.cc

index cf9e3ac51a7e12a516c9946e4551a6546d45db52..846cdf59501a44e36fc37e98df48d884d6674945 100644 (file)
@@ -48,14 +48,14 @@ AudioDecoder::AudioDecoder (shared_ptr<const Film> film, shared_ptr<const AudioC
 }
 
 void
-AudioDecoder::audio (shared_ptr<const AudioBuffers> data, AudioContent::Frame frame)
+AudioDecoder::audio (shared_ptr<const AudioBuffers> data, AudioContent::Frame)
 {
        if (_resampler) {
                data = _resampler->run (data);
        } 
 
        Audio (data, _audio_position);
-       _audio_position = frame + data->frames ();
+       _audio_position += data->frames ();
 }
 
 void