Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
0bd77df2
Unverified
Commit
0bd77df2
authored
Nov 29, 2022
by
Joao Gomes
Committed by
GitHub
Nov 29, 2022
Browse files
supress warning in VideoReader too (#6976)
parent
74ea933c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
torchvision/io/video_reader.py
torchvision/io/video_reader.py
+4
-1
No files found.
torchvision/io/video_reader.py
View file @
0bd77df2
...
@@ -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"
]:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment