diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-01-03 14:06:01 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-01-03 14:06:01 +0000 |
| commit | c3362d7b12e425fa9549579be10e708c88d5feea (patch) | |
| tree | 42c0698e0d5070bc4c81594fb44f65c4059e5e55 /src/lib/audio_decoder.cc | |
| parent | 43974f2cc0f88118336eece4361ebae20fc12aae (diff) | |
Fix _audio_position after seek.
Diffstat (limited to 'src/lib/audio_decoder.cc')
| -rw-r--r-- | src/lib/audio_decoder.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/audio_decoder.cc b/src/lib/audio_decoder.cc index d85bfaee2..adabd5d99 100644 --- a/src/lib/audio_decoder.cc +++ b/src/lib/audio_decoder.cc @@ -54,7 +54,7 @@ AudioDecoder::audio (shared_ptr<const AudioBuffers> data) if (_resampler) { data = _resampler->run (data); } - + _pending.push_back (shared_ptr<DecodedAudio> (new DecodedAudio (data, _audio_position))); _audio_position += data->frames (); } @@ -80,5 +80,5 @@ AudioDecoder::seek (ContentTime t, bool) assert (film); FrameRateChange frc = film->active_frame_rate_change (_audio_content->position ()); - _audio_position = (t + first_audio()) / frc.speed_up; + _audio_position = ((t + first_audio()) / frc.speed_up) * film->audio_frame_rate() / TIME_HZ; } |
