diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-08-30 00:59:26 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-08-30 00:59:26 +0100 |
| commit | 9ba99535750e19c341f6ff535c6c8991658a8fbb (patch) | |
| tree | b00e41294fe3129d99d9734086a17948e7d96483 /src/lib/audio_decoder.cc | |
| parent | d81db4280dd09ea9d0064272b075667d659b594a (diff) | |
Fix incorrect reel lengths in some cases; account for emitted data being rejected by the player, and for initial audio not to be at time 0.
Diffstat (limited to 'src/lib/audio_decoder.cc')
| -rw-r--r-- | src/lib/audio_decoder.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/audio_decoder.cc b/src/lib/audio_decoder.cc index 5425798f6..16a03a8e9 100644 --- a/src/lib/audio_decoder.cc +++ b/src/lib/audio_decoder.cc @@ -94,8 +94,7 @@ AudioDecoder::emit (AudioStreamPtr stream, shared_ptr<const AudioBuffers> data, data = ro; } - Data (stream, ContentAudio (data, _positions[stream])); - _positions[stream] += data->frames(); + _positions[stream] += Data(stream, ContentAudio (data, _positions[stream])).get_value_or(0); } /** @return Time just after the last thing that was emitted from a given stream */ |
