Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 committed May 29, 2024
1 parent dd502cd commit 6b031d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frigate/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,7 @@ def runtime_config(self, plus_api: PlusApi = None) -> FrigateConfig:
if need_detect_dimensions or need_record_fourcc:
stream_info = {"width": 0, "height": 0, "fourcc": None}
try:
stream_info = stream_info_retriever.get_resolution(input.path)
stream_info = stream_info_retriever.get_stream_info(input.path)
except Exception:
logger.warn(
f"Error detecting stream parameters automatically for {input.path} Applying default values."
Expand Down
4 changes: 2 additions & 2 deletions frigate/util/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,10 @@ class StreamInfoRetriever:
def __init__(self) -> None:
self.stream_cache: dict[str, tuple[int, int]] = {}

def get_resolution(self, path: str) -> str:
def get_stream_info(self, path: str) -> str:
if path in self.stream_cache:
return self.stream_cache[path]

info = asyncio.run(get_video_properties(input.path))
info = asyncio.run(get_video_properties(path))
self.stream_cache[path] = info
return info

0 comments on commit 6b031d3

Please sign in to comment.