Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix video stopping playback permanent when reaching end of stream #4750

Merged
merged 4 commits into from
Sep 4, 2021

Conversation

peppy
Copy link
Member

@peppy peppy commented Sep 2, 2021

bdach
bdach previously approved these changes Sep 2, 2021
@pull-request-size pull-request-size bot added size/S and removed size/L labels Sep 4, 2021
if (PlaybackPosition < decoder.Duration)
{
decoder.Seek(PlaybackPosition);
availableFrames.Clear();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a second look, isn't this leaking availableFrames if there are potentially any left? Shouldn't they get returned to the decoder again?

Copy link
Member Author

@peppy peppy Sep 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good catch. A bit scary this isn't guarded against. Have split this out.

@bdach bdach dismissed their stale review September 4, 2021 13:35

see above

@pull-request-size pull-request-size bot added size/M and removed size/S labels Sep 4, 2021
@bdach bdach enabled auto-merge September 4, 2021 13:53
@bdach bdach merged commit 0153979 into ppy:master Sep 4, 2021
@peppy peppy deleted the fix-decode-stopped-permanently-at-eof branch September 7, 2021 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants