diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-04-11 09:46:04 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-04-11 09:46:04 +0100 |
| commit | cb88159075ba02f0a9e013977f109645af797f9b (patch) | |
| tree | cd95e84872fb666936482c42623ffa9ffa7cdb5b /src/lib/audio_decoder.cc | |
| parent | b6fb67919acc88848ddc92f31abaeab376c3a846 (diff) | |
Missing set_frames call.
Diffstat (limited to 'src/lib/audio_decoder.cc')
| -rw-r--r-- | src/lib/audio_decoder.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/audio_decoder.cc b/src/lib/audio_decoder.cc index ee6a9bc98..6486d176a 100644 --- a/src/lib/audio_decoder.cc +++ b/src/lib/audio_decoder.cc @@ -109,7 +109,9 @@ AudioDecoder::audio (shared_ptr<const AudioBuffers> data, ContentTime time) assert (_audio_position >= (_decoded_audio.frame + _decoded_audio.audio->frames())); /* Resize _decoded_audio to fit the new data */ - _decoded_audio.audio->ensure_size (_audio_position.get() + data->frames() - _decoded_audio.frame); + int const new_size = _audio_position.get() + data->frames() - _decoded_audio.frame; + _decoded_audio.audio->ensure_size (new_size); + _decoded_audio.audio->set_frames (new_size); /* Copy new data in */ _decoded_audio.audio->copy_from (data.get(), data->frames(), 0, _audio_position.get() - _decoded_audio.frame); |
