Unverified Commit 0bd77df2 authored by Joao Gomes's avatar Joao Gomes Committed by GitHub
Browse files

supress warning in VideoReader too (#6976)

parent 74ea933c
...@@ -144,6 +144,9 @@ class VideoReader: ...@@ -144,6 +144,9 @@ class VideoReader:
elif self.backend == "pyav": elif self.backend == "pyav":
src = io.BytesIO(src) src = io.BytesIO(src)
else: else:
with warnings.catch_warnings():
# Ignore the warning because we actually dont modify the buffer in this function
warnings.filterwarnings("ignore", message="The given buffer is not writable")
src = torch.frombuffer(src, dtype=torch.uint8) src = torch.frombuffer(src, dtype=torch.uint8)
elif isinstance(src, torch.Tensor): elif isinstance(src, torch.Tensor):
if self.backend in ["cuda", "pyav"]: if self.backend in ["cuda", "pyav"]:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment