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)