projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d54b819
)
Be more checky about inputs.
author
Carl Hetherington
<cth@carlh.net>
Wed, 31 Oct 2012 01:13:22 +0000
(
01:13
+0000)
committer
Carl Hetherington
<cth@carlh.net>
Wed, 31 Oct 2012 01:13:22 +0000
(
01:13
+0000)
src/lib/decoder.cc
patch
|
blob
|
history
diff --git
a/src/lib/decoder.cc
b/src/lib/decoder.cc
index 6568ad08915e108e194a966957c7d689ad10da71..875ec5fcd36353fa3f932d753429ea771d284e77 100644
(file)
--- a/
src/lib/decoder.cc
+++ b/
src/lib/decoder.cc
@@
-179,6
+179,13
@@
Decoder::process_audio (uint8_t* data, int size)
void
Decoder::emit_audio (uint8_t* data, int size)
{
+ if (size == 0) {
+ return;
+ }
+
+ assert (_film->audio_channels());
+ assert (bytes_per_audio_sample());
+
/* Deinterleave and convert to float */
assert ((size % (bytes_per_audio_sample() * audio_channels())) == 0);