Seek correctly in AudioDecoder; the frame parameter is in resampled frames, so we...
authorCarl Hetherington <cth@carlh.net>
Tue, 20 Jan 2015 13:50:49 +0000 (13:50 +0000)
committerCarl Hetherington <cth@carlh.net>
Tue, 20 Jan 2015 13:50:49 +0000 (13:50 +0000)
src/lib/audio_decoder.cc

index 0c47b9f51a0b876650b4e7e9c8fa3ea2b3221d05..22376e3e36bb2c19d19fb77f82000f3a7cba987e 100644 (file)
@@ -63,7 +63,7 @@ AudioDecoder::get_audio (AudioFrame frame, AudioFrame length, bool accurate)
                
        if (frame < _decoded_audio.frame || end > (_decoded_audio.frame + length * 4)) {
                /* Either we have no decoded data, or what we do have is a long way from what we want: seek */
-               seek (ContentTime::from_frames (frame, _audio_content->audio_frame_rate()), accurate);
+               seek (ContentTime::from_frames (frame, _audio_content->resampled_audio_frame_rate()), accurate);
        }
 
        /* Offset of the data that we want from the start of _decoded_audio.audio