projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ce7f98
)
Fix a spurious assert() failure.
author
Carl Hetherington
<cth@carlh.net>
Fri, 2 May 2014 12:51:03 +0000
(13:51 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Fri, 2 May 2014 12:51:03 +0000
(13:51 +0100)
src/lib/audio_buffers.cc
patch
|
blob
|
history
diff --git
a/src/lib/audio_buffers.cc
b/src/lib/audio_buffers.cc
index 99e52d92ae0f7bea78e0356a05103fb8e43f65ce..4ada94db867b59d4fe7425fc6b048e0a251ae721 100644
(file)
--- a/
src/lib/audio_buffers.cc
+++ b/
src/lib/audio_buffers.cc
@@
-175,6
+175,11
@@
AudioBuffers::make_silent (int from, int frames)
void
AudioBuffers::copy_from (AudioBuffers const * from, int frames_to_copy, int read_offset, int write_offset)
{
+ if (frames_to_copy == 0) {
+ /* Prevent the asserts from firing if there is nothing to do */
+ return;
+ }
+
assert (from->channels() == channels());
assert (from);