# [Bugfix] Replace ffmpeg subprocess with PyAV to avoid HEVC decoder hang (#7364) (#7504)

Signed-off-by: RyanYun09 <318555231+RyanYun09@users.noreply.github.com>
This commit is contained in:
RyanYun09 authored and GitHub committed 2026-09-20 14:37:09 +00:00
1 parent 4d877780d3
commit d3396fc5fb
3 files changed
+378 -34

No files matched your search

@@ -6,7 +6,6 @@
from __future__ import annotations
import json
import subprocess
from pathlib import Path
from typing import Any
@@ -168,7 +167,7 @@ def _extract_frames(path: str | Path, timestamps: list[float]) -> list[bytes]:
for timestamp in timestamps:
try:
frame = extract_jpeg(path, timestamp=timestamp)
except (OSError, subprocess.CalledProcessError, ValueError):
except (OSError, ValueError):
continue
if frame.startswith(b"\xff\xd8"):
frames.append(frame)