diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-09-12 00:11:23 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-09-12 00:11:23 +0100 |
| commit | ec5d4f7f0525a39dab9d26d360c2c931cdc3d0f6 (patch) | |
| tree | cebf73fd8db06abfb95e7c11c997ee9eaad8ccaf /src/lib/audio_decoder.cc | |
| parent | 52eedc719d0d59d685af321ea268458e87a58da3 (diff) | |
Add context menu option to re-examine content (#339).
Diffstat (limited to 'src/lib/audio_decoder.cc')
| -rw-r--r-- | src/lib/audio_decoder.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/audio_decoder.cc b/src/lib/audio_decoder.cc index bd9dff8c9..756192286 100644 --- a/src/lib/audio_decoder.cc +++ b/src/lib/audio_decoder.cc @@ -173,6 +173,13 @@ AudioDecoder::audio (shared_ptr<const AudioBuffers> data, ContentTime time) void AudioDecoder::add (shared_ptr<const AudioBuffers> data) { + if (!_audio_position) { + /* This should only happen when there is a seek followed by a flush, but + we need to cope with it. + */ + return; + } + /* Resize _decoded_audio to fit the new data */ int new_size = 0; if (_decoded_audio.audio->frames() == 0) { |
