[ipcamera] Fix orphan ffmpeg process after stopping stream URL (#14909)

* Setting ffmpeg reference 'ffmpegMjpeg' to null after stopping convertion to fix automatic restart of ffmpeg process.

---------

Signed-off-by: Thomas Burri <th@thonojato.ch>
This commit is contained in:
tb4jc 2023-05-08 11:43:49 +02:00 committed by GitHub
parent 254efb5372
commit a2dcf2fcef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -212,6 +212,9 @@ public class CameraServlet extends IpCameraServlet {
Ffmpeg localMjpeg = handler.ffmpegMjpeg;
if (localMjpeg != null) {
localMjpeg.stopConverting();
// Set reference to ffmpegMjpeg to null to prevent automatic reconnection
// in handler's pollCameraRunnable() check for frozen camera
handler.ffmpegMjpeg = null;
}
} else {
handler.closeChannel(handler.getTinyUrl(handler.mjpegUri));