From f97741ef79bc496cbf0581527e1f54b369d246be Mon Sep 17 00:00:00 2001 From: houxiao <houxiao@454eff88-639b-444f-9e54-f578c98de674> Date: 星期四, 10 八月 2017 14:54:06 +0800 Subject: [PATCH] bug fix --- VisitFace/RtspNativeCodec/app/src/main/cpp/RemoteFuncClient.cpp | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/VisitFace/RtspNativeCodec/app/src/main/cpp/RemoteFuncClient.cpp b/VisitFace/RtspNativeCodec/app/src/main/cpp/RemoteFuncClient.cpp index 14c401b..8d0cd6d 100644 --- a/VisitFace/RtspNativeCodec/app/src/main/cpp/RemoteFuncClient.cpp +++ b/VisitFace/RtspNativeCodec/app/src/main/cpp/RemoteFuncClient.cpp @@ -7,16 +7,28 @@ #include "RtspNativeCodecJNIClient.h" RemoteServer<RtspFaceDetectImpl> remoteServer("127.0.0.1", 8111); +static RtspFaceViewClient* rtspFaceViewClient = nullptr; void startRemoteServer() { remoteServer.start(); } -RtspFaceViewClient rtspFaceViewClient; - -RtspFaceViewClient &RtspFaceViewClient() +RtspFaceViewClient* getRtspFaceViewClient() { + if (rtspFaceViewClient != nullptr) + { + try + { + rtspFaceViewClient = new RtspFaceViewClient; + } + catch(...) + { + delete rtspFaceViewClient; + rtspFaceViewClient = nullptr; + LOG_ERROR << "aaaaaaaa"<<LOG_ENDL;//#todo + } + } return rtspFaceViewClient; } -- Gitblit v1.8.0