mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-14 05:25:44 +00:00
Massive memory leaks on PAT change #264
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cfsmp3 on GitHub (Jan 25, 2017).
Originally assigned to: @alexbrt on GitHub.
In general, the PAT on a transport stream doesn't change, as that would mean that a stream was added or removed, which it's an uncommon event.
But it can happen, and when it does we need to do proper clean up. What CCExtractor does in this case is clear the PMT table and mark all streams as "unseen", which forces all PMTs to be reloaded again. This was OK at some point in time, but it's not any more as when a program context is created a number of things happen (including OCR initialization).
So we need to do problem clean up. Otherwise we keep getting more and more resources and never free them.
This happens in ts_tables.c:
Assigning to @AlexBratosin2001 since he was the one fighting multiprogram, memory allocation, etc.
@cfsmp3 commented on GitHub (Jan 25, 2017):
GSoC qualification: This gives 3 points.