openframeworks / openframeworks/openFrameworks
ofAVFoundationVideoPlayer memory leak
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
Just noticed a large memory leak in ofAVFoundationVideoPlayer's -(void) updateFromVideoOutput method. The CVPixelBufferRef buffer does not get released. If you load any HD movie and constantly adjust the playhead (setPosition() or setFrame()) - it will eat through all your memory very quick (8gb of memory in less than 2 min for me).
Fix: https://github.com/trentbrooks/openFrameworks/commit/7312aff0f7667df379c4b3bd91857d51e9ec25d0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating ofAVFoundationVideoPlayer's updateFromVideoOutput method and reviewing the referenced commit 7312aff0f7667df379c4b3bd91857d51e9ec25d0. Reproduce the issue with an HD movie while repeatedly adjusting the playhead via setPosition() or setFrame(). Done means the CVPixelBufferRef is released and memory no longer grows rapidly during that stress case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- audio-video-rtc
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100