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

bug: Fix memory leakage cause by permanent storage of decoded video frame and not closed video stream #380

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hilookas
Copy link

@hilookas hilookas commented Aug 26, 2024

What this does

load_from_videos will storage decoded image to internal self.hf_dataset array, which will cause memory leakage specifically with large size of image.

item = self.hf_dataset[idx]

Besides that, PyAV has a bug, which will cause memory leak when stream is not properly closed.

See: PyAV-Org/PyAV#1117

How to checkout & try? (for the reviewer)

Provide a simple way for the reviewer to try out your changes.

Examples:

htop

# sorry, but memory leakage issue is hard to write a test...

@hilookas hilookas changed the title Fix memory leakage cause by permanent storage of decoded video frame Fix memory leakage cause by permanent storage of decoded video frame and not closed video stream Aug 26, 2024
@hilookas hilookas changed the title Fix memory leakage cause by permanent storage of decoded video frame and not closed video stream bug: Fix memory leakage cause by permanent storage of decoded video frame and not closed video stream Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant