Ticket #6962: libs_libmythfreesurround-uninit-ctors

File libs_libmythfreesurround-uninit-ctors, 855 bytes (added by Erik Hovland <erik@…>, 11 years ago)

Initialize buffers in the ctor of the class

Line 
1Make sure member variables are initialized in the ctor of the class
2
3From: Erik Hovland <erik@hovland.org>
4
5
6---
7
8 mythtv/libs/libmythfreesurround/el_processor.cpp |    2 ++
9 1 files changed, 2 insertions(+), 0 deletions(-)
10
11
12diff --git a/mythtv/libs/libmythfreesurround/el_processor.cpp b/mythtv/libs/libmythfreesurround/el_processor.cpp
13index 8761dad..8b22b81 100644
14--- a/mythtv/libs/libmythfreesurround/el_processor.cpp
15+++ b/mythtv/libs/libmythfreesurround/el_processor.cpp
16@@ -113,6 +113,8 @@ public:
17         // also add a gain factor of *2 due to processing gain in algo (see center_level)
18         surround_gain(1.0);
19         current_buf = 0;
20+        memset(inbufs, 0, sizeof(inbufs));
21+        memset(outbufs, 0, sizeof(outbufs));
22         // set the default coefficients
23         surround_coefficients(0.8165,0.5774);
24         phase_mode(0);