projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f0259b7
)
Don't emit zero-sample buffers.
author
Carl Hetherington
<cth@carlh.net>
Thu, 23 Feb 2017 21:40:16 +0000
(21:40 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Wed, 19 Apr 2017 22:04:32 +0000
(23:04 +0100)
src/lib/player.cc
patch
|
blob
|
history
diff --git
a/src/lib/player.cc
b/src/lib/player.cc
index dffe7dbee52d3a7bde7372dde98464d9c8f99b2f..7d8add416132fe52f4bc59c9faf4b39099502ccf 100644
(file)
--- a/
src/lib/player.cc
+++ b/
src/lib/player.cc
@@
-545,9
+545,12
@@
Player::pass ()
DCPTime t = _last_audio_time;
while (t < length) {
DCPTime block = min (DCPTime::from_seconds (0.5), length - t);
DCPTime t = _last_audio_time;
while (t < length) {
DCPTime block = min (DCPTime::from_seconds (0.5), length - t);
- shared_ptr<AudioBuffers> silence (new AudioBuffers (_film->audio_channels(), block.frames_round(_film->audio_frame_rate())));
- silence->make_silent ();
- Audio (silence, t);
+ Frame const samples = block.frames_round(_film->audio_frame_rate());
+ if (samples) {
+ shared_ptr<AudioBuffers> silence (new AudioBuffers (_film->audio_channels(), samples));
+ silence->make_silent ();
+ Audio (silence, t);
+ }
t += block;
}
t += block;
}