Skip to content

Dup last sub - #1259

Open
kierank wants to merge 3 commits into
Upipe:masterfrom
kierank:dup-last-sub
Open

kierank wants to merge 3 commits into
Upipe:masterfrom
kierank:dup-last-sub

Conversation

@kierank

@kierank kierank commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

No description provided.

The loop declared a second variable named output for the current sub,
so the test that the dup has no direct output read the sub pointer
instead and never held: every sub got a copy and the original was freed
after the loop, one uref_dup and one uref_free per input more than
written.  The dup test now checks which sink receives the original.
ulist is circular, so the last sub's uchain->next is the list head and
never NULL: every TS packet on every PID was duplicated once per sub and
the original freed afterwards.  A PID with a single sub now costs no
allocation in the split.
Same circular-list test as in upipe_ts_split: every section was
duplicated once per sub and the original freed.
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