From fde87ec343e6e64e339b0d81b0ca299ebd48721b Mon Sep 17 00:00:00 2001 From: satojkovic Date: Sat, 26 Feb 2022 22:39:28 +0900 Subject: [PATCH] Fix append of audio_pts --- gallery/plot_video_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gallery/plot_video_api.py b/gallery/plot_video_api.py index 5ab03af08a6..e948212d919 100644 --- a/gallery/plot_video_api.py +++ b/gallery/plot_video_api.py @@ -158,7 +158,7 @@ def example_read_video(video_object, start=0, end=None, read_video=True, read_au frames = [] for frame in itertools.takewhile(lambda x: x['pts'] <= end, video_object.seek(start)): frames.append(frame['data']) - video_pts.append(frame['pts']) + audio_pts.append(frame['pts']) if len(frames) > 0: audio_frames = torch.cat(frames, 0)