Fixes initialization defects in mythphone.

From: Erik Hovland <erik@hovland.org>


---

 mythplugins/mythphone/mythphone/directory.cpp  |   43 ++++++++++--------------
 mythplugins/mythphone/mythphone/dtmffilter.cpp |    1 +
 mythplugins/mythphone/mythphone/h263.cpp       |   14 +++-----
 mythplugins/mythphone/mythphone/vxml.cpp       |   14 +++-----
 mythplugins/mythphone/mythphone/wavfile.cpp    |    4 +-
 5 files changed, 33 insertions(+), 43 deletions(-)

diff --git a/mythplugins/mythphone/mythphone/directory.cpp b/mythplugins/mythphone/mythphone/directory.cpp
index 56df94c..7094013 100644
--- a/mythplugins/mythphone/mythphone/directory.cpp
+++ b/mythplugins/mythphone/mythphone/directory.cpp
@@ -26,35 +26,26 @@ static int counter = 0;
 ///////////////////////////////////////////////////////
 
 DirEntry::DirEntry(QString nn, QString uri, QString fn, QString sn, QString ph, bool ohl)
+    : NickName(nn),      FirstName(fn)
+    , Surname(sn),       Uri(uri)
+    , PhotoFile(ph),     id(counter++)
+    , SpeedDial(false),  onHomeLan(ohl)
+    , inDatabase(false), changed(true)
+    , dbId(-1),          TreeNode(0)
+    , SpeeddialNode(0)
 {
-    NickName = nn;
-    FirstName = fn;
-    Surname = sn;
-    Uri = uri;
-    PhotoFile = ph;
-    id = counter++;
-    SpeedDial = false;
-    inDatabase = false;
-    changed = true;
-    onHomeLan = ohl;
-    dbId = -1;
 }
 
 
 DirEntry::DirEntry(DirEntry *Original)
+    : NickName(Original->NickName),   FirstName(Original->FirstName)
+    , Surname(Original->Surname),     Uri(Original->Uri)
+    , PhotoFile(Original->PhotoFile), id(counter++)
+    , SpeedDial(Original->SpeedDial), onHomeLan(Original->onHomeLan)
+    , inDatabase(false),              changed(true)
+    , dbId(-1),                       TreeNode(0)
+    , SpeeddialNode(0)
 {
-    NickName = Original->NickName;
-    FirstName = Original->FirstName;
-    Surname = Original->Surname;
-    Uri = Original->Uri;
-    PhotoFile = Original->PhotoFile;
-    onHomeLan = Original->onHomeLan;
-    id = counter++;
-    inDatabase = false;
-    changed = true;
-    dbId = -1;
-    TreeNode = 0;
-    SpeeddialNode = 0;
 }
 
 
@@ -578,9 +569,11 @@ void CallHistory::deleteRecords()
 
 
 DirectoryContainer::DirectoryContainer()
-{
     // Create the Call History directory
-    callHistory = new CallHistory();
+    : callHistory(new CallHistory()), TreeRoot(0)
+    , voicemailTree(0),               receivedcallsTree(0)
+    , placedcallsTree(0),             speeddialTree(0)
+{
 }
 
 
diff --git a/mythplugins/mythphone/mythphone/dtmffilter.cpp b/mythplugins/mythphone/mythphone/dtmffilter.cpp
index fb7c657..b1cba87 100644
--- a/mythplugins/mythphone/mythphone/dtmffilter.cpp
+++ b/mythplugins/mythphone/mythphone/dtmffilter.cpp
@@ -171,6 +171,7 @@ Goertzel Generic Filter class.
 **********************************************************************/
 
 goertzel::goertzel(int N, float targetFreq, float sampleRate)
+    : Match(0)
 {
     initialise(N, targetFreq, sampleRate);
 }
diff --git a/mythplugins/mythphone/mythphone/h263.cpp b/mythplugins/mythphone/mythphone/h263.cpp
index 1c99cf6..f60b5b4 100644
--- a/mythplugins/mythphone/mythphone/h263.cpp
+++ b/mythplugins/mythphone/mythphone/h263.cpp
@@ -24,15 +24,13 @@ using namespace std;
 
 
 H263Container::H263Container()
+    : pictureIn(0),          h263Encoder(0)
+    , h263Decoder(0),        h263EncContext(0)
+    , h263DecContext(0),     MaxPostEncodeSize(0)
+    , lastCompressedSize(0), PostEncodeFrame(0)
+    , PreEncodeFrame(0)
 {
-    lastCompressedSize = 0;
-    PostEncodeFrame = 0;
-    h263Encoder = 0;
-    h263EncContext = 0;
-
-    h263Decoder = 0;
-    h263DecContext = 0;
-    pictureIn = 0;
+    memset(&pictureOut, 0, sizeof(pictureOut));
 
     avcodec_init();
     avcodec_register_all();
diff --git a/mythplugins/mythphone/mythphone/vxml.cpp b/mythplugins/mythphone/mythphone/vxml.cpp
index 549a1c5..f42b90c 100644
--- a/mythplugins/mythphone/mythphone/vxml.cpp
+++ b/mythplugins/mythphone/mythphone/vxml.cpp
@@ -983,18 +983,16 @@ void vxmlVarContainer::removeMatching(QString N)
 }
 
 vxmlVariable::vxmlVariable(QString N, QString V)
+    : Name(N),   Type("STRING")
+    , sValue(V), spValue(0)
+    ,spLength(0)
 {
-    Name = N;
-    sValue = V;
-    Type = "STRING";
-    spValue = 0;
 }
 
 vxmlVariable::vxmlVariable(QString N, short *wav, int S)
+    : Name(N),    Type("SHORTPTR")
+    , sValue(""), spValue(wav)
+    , spLength(S)
 {
-    Name = N;
-    spValue = wav;
-    spLength = S;
-    Type = "SHORTPTR";
 }
 
diff --git a/mythplugins/mythphone/mythphone/wavfile.cpp b/mythplugins/mythphone/mythphone/wavfile.cpp
index aefbece..730e28f 100644
--- a/mythplugins/mythphone/mythphone/wavfile.cpp
+++ b/mythplugins/mythphone/mythphone/wavfile.cpp
@@ -20,9 +20,9 @@ using namespace std;
 #include <mythtv/mythverbose.h>
 
 wavfile::wavfile()
+    : loaded(false), audio(0)
 {
-    loaded=false;
-    audio = 0;
+    memset(&w, 0, sizeof(w));
 }
 
 wavfile::~wavfile()
