bakaid commented on a change in pull request #612: MINIFICPP-854: Capture RTSP 
Frame
URL: https://github.com/apache/nifi-minifi-cpp/pull/612#discussion_r304340149
 
 

 ##########
 File path: extensions/opencv/CaptureRTSPFrame.cpp
 ##########
 @@ -155,12 +172,12 @@ void CaptureRTSPFrame::onTrigger(const 
std::shared_ptr<core::ProcessContext> &co
   }
 
   frame.release();
-
 }
 
 void CaptureRTSPFrame::notifyStop() {
   // Release the Capture reference and free up resources.
   video_capture_.release();
+  unsetenv("OPENCV_FFMPEG_CAPTURE_OPTIONS");
 
 Review comment:
   The setenv is in initialize(), which is not the logical pair for notifyStop. 
When the processor is restarted with onSchedule, the env will not be set again. 
Either we should not unset this, or move the setenv to onSchedule.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to