Unverified Commit 7767f120 authored by satojkovic's avatar satojkovic Committed by GitHub
Browse files

Fix append of audio_pts (#5488)


Co-authored-by: default avatarPrabhat Roy <prabhatroy@fb.com>
parent 095437aa
...@@ -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'])
video_pts.append(frame['pts']) audio_pts.append(frame['pts'])
if len(frames) > 0: if len(frames) > 0:
audio_frames = torch.cat(frames, 0) audio_frames = torch.cat(frames, 0)
......
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