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
7767f120
Unverified
Commit
7767f120
authored
Mar 01, 2022
by
satojkovic
Committed by
GitHub
Feb 28, 2022
Browse files
Fix append of audio_pts (#5488)
Co-authored-by:
Prabhat Roy
<
prabhatroy@fb.com
>
parent
095437aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
gallery/plot_video_api.py
gallery/plot_video_api.py
+1
-1
No files found.
gallery/plot_video_api.py
View file @
7767f120
...
@@ -158,7 +158,7 @@ def example_read_video(video_object, start=0, end=None, read_video=True, read_au
...
@@ -158,7 +158,7 @@ def example_read_video(video_object, start=0, end=None, read_video=True, read_au
frames
=
[]
frames
=
[]
for
frame
in
itertools
.
takewhile
(
lambda
x
:
x
[
'pts'
]
<=
end
,
video_object
.
seek
(
start
)):
for
frame
in
itertools
.
takewhile
(
lambda
x
:
x
[
'pts'
]
<=
end
,
video_object
.
seek
(
start
)):
frames
.
append
(
frame
[
'data'
])
frames
.
append
(
frame
[
'data'
])
vide
o_pts
.
append
(
frame
[
'pts'
])
audi
o_pts
.
append
(
frame
[
'pts'
])
if
len
(
frames
)
>
0
:
if
len
(
frames
)
>
0
:
audio_frames
=
torch
.
cat
(
frames
,
0
)
audio_frames
=
torch
.
cat
(
frames
,
0
)
...
...
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