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
|
b
|
static int counter = 0; |
26 | 26 | /////////////////////////////////////////////////////// |
27 | 27 | |
28 | 28 | DirEntry::DirEntry(QString nn, QString uri, QString fn, QString sn, QString ph, bool ohl) |
| 29 | : NickName(nn), FirstName(fn) |
| 30 | , Surname(sn), Uri(uri) |
| 31 | , PhotoFile(ph), id(counter++) |
| 32 | , SpeedDial(false), onHomeLan(ohl) |
| 33 | , inDatabase(false), changed(true) |
| 34 | , dbId(-1), TreeNode(0) |
| 35 | , SpeeddialNode(0) |
29 | 36 | { |
30 | | NickName = nn; |
31 | | FirstName = fn; |
32 | | Surname = sn; |
33 | | Uri = uri; |
34 | | PhotoFile = ph; |
35 | | id = counter++; |
36 | | SpeedDial = false; |
37 | | inDatabase = false; |
38 | | changed = true; |
39 | | onHomeLan = ohl; |
40 | | dbId = -1; |
41 | 37 | } |
42 | 38 | |
43 | 39 | |
44 | 40 | DirEntry::DirEntry(DirEntry *Original) |
| 41 | : NickName(Original->NickName), FirstName(Original->FirstName) |
| 42 | , Surname(Original->Surname), Uri(Original->Uri) |
| 43 | , PhotoFile(Original->PhotoFile), id(counter++) |
| 44 | , SpeedDial(Original->SpeedDial), onHomeLan(Original->onHomeLan) |
| 45 | , inDatabase(false), changed(true) |
| 46 | , dbId(-1), TreeNode(0) |
| 47 | , SpeeddialNode(0) |
45 | 48 | { |
46 | | NickName = Original->NickName; |
47 | | FirstName = Original->FirstName; |
48 | | Surname = Original->Surname; |
49 | | Uri = Original->Uri; |
50 | | PhotoFile = Original->PhotoFile; |
51 | | onHomeLan = Original->onHomeLan; |
52 | | id = counter++; |
53 | | inDatabase = false; |
54 | | changed = true; |
55 | | dbId = -1; |
56 | | TreeNode = 0; |
57 | | SpeeddialNode = 0; |
58 | 49 | } |
59 | 50 | |
60 | 51 | |
… |
… |
void CallHistory::deleteRecords() |
578 | 569 | |
579 | 570 | |
580 | 571 | DirectoryContainer::DirectoryContainer() |
581 | | { |
582 | 572 | // Create the Call History directory |
583 | | callHistory = new CallHistory(); |
| 573 | : callHistory(new CallHistory()), TreeRoot(0) |
| 574 | , voicemailTree(0), receivedcallsTree(0) |
| 575 | , placedcallsTree(0), speeddialTree(0) |
| 576 | { |
584 | 577 | } |
585 | 578 | |
586 | 579 | |
diff --git a/mythplugins/mythphone/mythphone/dtmffilter.cpp b/mythplugins/mythphone/mythphone/dtmffilter.cpp
index fb7c657..b1cba87 100644
a
|
b
|
Goertzel Generic Filter class. |
171 | 171 | **********************************************************************/ |
172 | 172 | |
173 | 173 | goertzel::goertzel(int N, float targetFreq, float sampleRate) |
| 174 | : Match(0) |
174 | 175 | { |
175 | 176 | initialise(N, targetFreq, sampleRate); |
176 | 177 | } |
diff --git a/mythplugins/mythphone/mythphone/h263.cpp b/mythplugins/mythphone/mythphone/h263.cpp
index 1c99cf6..f60b5b4 100644
a
|
b
|
using namespace std; |
24 | 24 | |
25 | 25 | |
26 | 26 | H263Container::H263Container() |
| 27 | : pictureIn(0), h263Encoder(0) |
| 28 | , h263Decoder(0), h263EncContext(0) |
| 29 | , h263DecContext(0), MaxPostEncodeSize(0) |
| 30 | , lastCompressedSize(0), PostEncodeFrame(0) |
| 31 | , PreEncodeFrame(0) |
27 | 32 | { |
28 | | lastCompressedSize = 0; |
29 | | PostEncodeFrame = 0; |
30 | | h263Encoder = 0; |
31 | | h263EncContext = 0; |
32 | | |
33 | | h263Decoder = 0; |
34 | | h263DecContext = 0; |
35 | | pictureIn = 0; |
| 33 | memset(&pictureOut, 0, sizeof(pictureOut)); |
36 | 34 | |
37 | 35 | avcodec_init(); |
38 | 36 | avcodec_register_all(); |
diff --git a/mythplugins/mythphone/mythphone/vxml.cpp b/mythplugins/mythphone/mythphone/vxml.cpp
index 549a1c5..f42b90c 100644
a
|
b
|
void vxmlVarContainer::removeMatching(QString N) |
983 | 983 | } |
984 | 984 | |
985 | 985 | vxmlVariable::vxmlVariable(QString N, QString V) |
| 986 | : Name(N), Type("STRING") |
| 987 | , sValue(V), spValue(0) |
| 988 | ,spLength(0) |
986 | 989 | { |
987 | | Name = N; |
988 | | sValue = V; |
989 | | Type = "STRING"; |
990 | | spValue = 0; |
991 | 990 | } |
992 | 991 | |
993 | 992 | vxmlVariable::vxmlVariable(QString N, short *wav, int S) |
| 993 | : Name(N), Type("SHORTPTR") |
| 994 | , sValue(""), spValue(wav) |
| 995 | , spLength(S) |
994 | 996 | { |
995 | | Name = N; |
996 | | spValue = wav; |
997 | | spLength = S; |
998 | | Type = "SHORTPTR"; |
999 | 997 | } |
1000 | 998 | |
diff --git a/mythplugins/mythphone/mythphone/wavfile.cpp b/mythplugins/mythphone/mythphone/wavfile.cpp
index aefbece..730e28f 100644
a
|
b
|
using namespace std; |
20 | 20 | #include <mythtv/mythverbose.h> |
21 | 21 | |
22 | 22 | wavfile::wavfile() |
| 23 | : loaded(false), audio(0) |
23 | 24 | { |
24 | | loaded=false; |
25 | | audio = 0; |
| 25 | memset(&w, 0, sizeof(w)); |
26 | 26 | } |
27 | 27 | |
28 | 28 | wavfile::~wavfile() |