Initialize video_sources and audio_sources to prevent crash
This commit is contained in:
parent
5f791bce3e
commit
ff2017d8b0
|
@ -172,12 +172,16 @@ int main(int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
xop::MediaSession **sessions = new xop::MediaSession *[monitors.size()];
|
xop::MediaSession **sessions = new xop::MediaSession *[monitors.size()];
|
||||||
for (size_t i = 0; i < monitors.size(); i++) sessions[i] = nullptr;
|
|
||||||
|
|
||||||
std::vector<ZoneMinderFifoSource *> video_sources;
|
std::vector<ZoneMinderFifoSource *> video_sources;
|
||||||
video_sources.reserve(monitors.size());
|
video_sources.reserve(monitors.size());
|
||||||
std::vector<ZoneMinderFifoSource *> audio_sources;
|
std::vector<ZoneMinderFifoSource *> audio_sources;
|
||||||
audio_sources.reserve(monitors.size());
|
audio_sources.reserve(monitors.size());
|
||||||
|
for (size_t i = 0; i < monitors.size(); i++) {
|
||||||
|
sessions[i] = nullptr;
|
||||||
|
video_sources[i] = nullptr;
|
||||||
|
audio_sources[i] = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
while (!zm_terminate) {
|
while (!zm_terminate) {
|
||||||
for (size_t i = 0; i < monitors.size(); i++) {
|
for (size_t i = 0; i < monitors.size(); i++) {
|
||||||
|
|
Loading…
Reference in New Issue