Memory Leak: File buffer not freed, leaking 16MB per demuxer instance #897

Closed
opened 2026-01-29 16:56:28 +00:00 by claunia · 1 comment
Owner

Originally created by @THE-Amrit-mahto-05 on GitHub (Jan 7, 2026).

Description

Discovered a memory leak in CCExtractor: the file buffer allocated by the demuxer is never freed. This results in approximately 16MB of memory being leaked for each demuxer instance.

Steps to Reproduce

  1. Run CCExtractor on a video file.
  2. Observe memory usage of the process.
  3. Repeat with multiple files or instances.
  4. Memory usage continues to grow and is not released.

Impact

  • Long-running or batch operations can consume large amounts of memory.
  • Could cause crashes or slow performance on low-memory systems.
  • This is a real, current issue affecting stability, not a futuristic concern.

Suggestion

  • Free the allocated file buffer after demuxing completes.
  • Add tests to verify that buffers are properly released.
Originally created by @THE-Amrit-mahto-05 on GitHub (Jan 7, 2026). ### Description Discovered a memory leak in CCExtractor: the file buffer allocated by the demuxer is never freed. This results in approximately 16MB of memory being leaked for each demuxer instance. ### Steps to Reproduce 1. Run CCExtractor on a video file. 2. Observe memory usage of the process. 3. Repeat with multiple files or instances. 4. Memory usage continues to grow and is not released. ### Impact - Long-running or batch operations can consume large amounts of memory. - Could cause crashes or slow performance on low-memory systems. - This is a real, current issue affecting stability, not a futuristic concern. ### Suggestion - Free the allocated file buffer after demuxing completes. - Add tests to verify that buffers are properly released.
Author
Owner

@cfsmp3 commented on GitHub (Jan 8, 2026):

Please don't open a ticket for these things - PRs are OK, but issues are for users to report problems. If a developer sees a problem he/she just sends a PR.

@cfsmp3 commented on GitHub (Jan 8, 2026): Please don't open a ticket for these things - PRs are OK, but issues are for users to report problems. If a developer sees a problem he/she just sends a PR.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#897