mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-05-24 22:47:06 -04:00
Disconnect and Reconnect in PrimeCapture instead of in constructor and descructor. Fixes camera not reconnecting.
This commit is contained in:
@@ -103,8 +103,6 @@ void RemoteCameraRtsp::Initialise() {
|
||||
buffer.size(max_size);
|
||||
|
||||
FFMPEGInit();
|
||||
|
||||
Connect();
|
||||
}
|
||||
|
||||
void RemoteCameraRtsp::Terminate() {
|
||||
@@ -126,6 +124,9 @@ int RemoteCameraRtsp::Disconnect() {
|
||||
}
|
||||
|
||||
int RemoteCameraRtsp::PrimeCapture() {
|
||||
if (rtspThread) Disconnect();
|
||||
Connect();
|
||||
|
||||
Debug(2, "Waiting for sources");
|
||||
for (int i = 100; i && !zm_terminate && !rtspThread->hasSources(); i--) {
|
||||
std::this_thread::sleep_for(Microseconds(10000));
|
||||
|
||||
Reference in New Issue
Block a user