mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 09:45:22 +03:00
Delete pipe file if it exists
This commit is contained in:
parent
f2a5b9e650
commit
072861a0a9
@ -39,6 +39,9 @@ class FFMpegConverter:
|
||||
birdseye_rtsp: bool = False,
|
||||
):
|
||||
if birdseye_rtsp:
|
||||
if os.path.exists(BIRDSEYE_PIPE):
|
||||
os.remove(BIRDSEYE_PIPE)
|
||||
|
||||
os.mkfifo(BIRDSEYE_PIPE, mode=0o777)
|
||||
stdin = os.open(BIRDSEYE_PIPE, os.O_RDONLY | os.O_NONBLOCK)
|
||||
self.bd_pipe = os.open(BIRDSEYE_PIPE, os.O_WRONLY)
|
||||
@ -96,7 +99,6 @@ class FFMpegConverter:
|
||||
def exit(self):
|
||||
if self.bd_pipe:
|
||||
os.close(self.bd_pipe)
|
||||
os.remove(BIRDSEYE_PIPE)
|
||||
|
||||
self.process.terminate()
|
||||
try:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user