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
fe3b4c8f
Unverified
Commit
fe3b4c8f
authored
Jul 23, 2019
by
Francisco Massa
Committed by
GitHub
Jul 23, 2019
Browse files
Ignore utf-8 decode errors (#1153)
Also make logging less verbose
parent
f03f3140
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
torchvision/io/video.py
torchvision/io/video.py
+3
-2
No files found.
torchvision/io/video.py
View file @
fe3b4c8f
...
...
@@ -4,6 +4,7 @@ import numpy as np
try
:
import
av
av
.
logging
.
set_level
(
av
.
logging
.
ERROR
)
except
ImportError
:
av
=
None
...
...
@@ -118,7 +119,7 @@ def read_video(filename, start_pts=0, end_pts=None):
raise
ValueError
(
"end_pts should be larger than start_pts, got "
"start_pts={} and end_pts={}"
.
format
(
start_pts
,
end_pts
))
container
=
av
.
open
(
filename
)
container
=
av
.
open
(
filename
,
metadata_errors
=
'ignore'
)
info
=
{}
video_frames
=
[]
...
...
@@ -162,7 +163,7 @@ def read_video_timestamps(filename):
video_fps (int): the frame rate for the video
"""
_check_av_available
()
container
=
av
.
open
(
filename
)
container
=
av
.
open
(
filename
,
metadata_errors
=
'ignore'
)
video_frames
=
[]
video_fps
=
None
...
...
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